Removed unnecessary copying of nodes