ID pin

I have had 2 instances of this happening in slightly different ways so far, using the hidden ID pin for nodes and subpatches,
where in the first instance the pin gives the wrong value, and the second where it returned a null.
What might have an influence is that these subpatches are switched using create node, they may well load as 1 patch and switch as soon as loaded, maybe this is the problem?