Replaces Proxy.createFunction with new Proxy