LPS-31796 Copy the classloader when creating the proxy