DNN-6286: Performance issue in UriExtensions.IsLocalUri with DNS checks