fix bug in skip_self_domain check