Does this really belong in Code Block Node, given that it's about the relationship between multiple CBNs? Consider factoring into another class.

The function name needs changing: IsVariableAlreadyDeclared. It shouldn't be returning a string.

This is also linear in the number of nodes, not in the number of CBNs, which is expensive.