Thanks Campbell, I'm red-green colour-blind but I can see the difference between the red and green in your post just fine
(but blue and red is easier!).
An instance of a non-static inner class indeed has a link to the instance of its containing class. You can't change that link; you cannot make the instance of the other class have a link to a different instance of its containing class than the one it was created for.
In your example your outer class has a member variable that refers to an instance of an inner class, but this is not the same thing as the link that the instance of the inner class has to its containing class. The member variable of the outer class has nothing to do with this link, so setting the member variable to a different instance of the inner class does not change the link that the instance of the inner class has to the instance of its containing class.
Note that static inner classes do not have a link to an instance of the containing class.