Fix bug introdiced by d993660 causing sites to load in other domains #2271