domain: fix is_domain_local when used from internal