Fix for stripping hostname in DNS::ResolveIP

Ported from Code-11-SP3.