Fixing a tree copy bug.