Use new Network.are_host_same() equivalency check

Replace the existing "is localhost" checks with new, more reliable
method.