Fixing issue where url stream handler factory is registered multiple tim...

...es