Ensure uri doesn't already have static domain before adding it.

From #6233.