Domains are being added with case sensitivity
If a resolver has a client's domain cached in CAPS, foreman will interpret that as a new domain when the client checks in and provides it's latest facts (resulting in potential extra domains of: caps.net, CAPS.net, caps.NET, and CAPS.net). This in turn will effect any matchers that are dependent upon 'domain =~'. This issue was patched in a previous version of foreman (see Bug #708), although it seems to have re-surfaced.
It looks as if the import_host_facts function in models/host/managed.rb is in fact changing the hostname to all lowercase, but this isn't the case for the domain.