Fix regressions in domain handling.