Fixes #7465. Reworked the regexp and associated test for cross-domain detection so...