Changed deepCopyNode to our own implementation again to handle setting parent nodes, the Groovy Node.clone() method does NOT do this
Changed back to use deepCopyNode instead of Node.clone()