Improved code for getting deep copy into same subtree to work.