Added support to temporarily change the class loader for the current thread in Factories only.