Make sure setURLStreamHandlerFactory() does not get called more than once