Copy xml elements before appending to tree.  This prevents modified entries from being added