Clone the object instead of setting a reference http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.clone(v=vs.110).aspx
// TreeNode curNode = inNode; // set by reference
TreeNode curNode = (TreeNode) inNode.Clone(); // clone (set by value)
Now when you modify the curNode object, the inNode should be unmodified.
EDIT this only seems to be shallow copy.
(from msdn TreeNode.Clone Method)
Remarks: The tree structure from the tree node being cloned and below is copied. Any child tree nodes assigned to the TreeNode being cloned are included in the new tree node and subtree.
The Clone method performs a shallow copy of the node. If the value of the Tag property is a reference type, both the original and cloned copy will point to the same single instance of the Tag value.
You could try to make a deep copy of the object, more reference of how here.
Or you could 'backup' the values you want to preserve and copy them back to the inNode object when you are done using curNode