The previous code updated the wrong node tree. The result was that the new group node did not have the socket that was supposed to be linked.
The previous code updated the wrong node tree. The result was that the new group node did not have the socket that was supposed to be linked.