On testing with large numbers of unknown domains the send-root-referral

argument query amounted to quite a high proportion of CPU time. This will cache
it to reduce this overhead as is already done with a number of variables.