I still do not see any problem. The whole purpose of the function is to copy ALL sequences , tables and functions to "new" schema, so new.old WILL exist.
I don't see how you can possibly write a function that references a schema that does not yet exist!
Again, please provide a _working_ example of what you think the problem is.