When copying a full node tree, we can avoid an O(n^2) loop finding a unique name for every node if we assume they already have unique names. That is a reasonable assumption, since unique names are verified elsewhere when adding a new node. Copying a node tree with about 4000 nodes took 42 ms before, now it takes 6 ms. Differential Revision: https://developer.blender.org/D13644