Error Pasting GoSubGraph

I don’t understand how that line of code can cause a null reference exception.
GoDiagram doesn’t have any knowledge about changing names for nodes. All of this that you are talking about is application specific.

Well I don’t understand how that line of code can cause a null reference exception either - that is why I am posting to this forum.
After weeks of testing this problem, the only thing that we can come up with is that GoDiagram does something very specific when it copies and pastes subgraphs and somehow changing the names of nodes inside subgraphs interferes with this process in some way.

Both copy and paste use GoDocument.CopyFromCollection, which in turn depend on GoObject.CopyObject.
Nothing in GoDiagram cares about what string values different GoText objects have.
A subgraph in the clipboard is brought into memory (deserialized) and then copied into your document. First the subgraph is copied, and then it is added to your document. Does your name-checking code handle the case where there are multiple name conflicts in nodes that are children of the subgraph that is being added?