Fixed the referral checks to work properly when there is non-group and non-account referral.. Reducing non-same-host referral path to ""