Make Wrapper.cloneIntoContentScope handle functions and primitives correctly