
The code only updated nodes in the nodetree of the scene to which the render layer belongs. Therefore, when using scene B in the compositor setup of scene A, A's node wouldn't be updated. With this fix, the update function loops over all scenes and checks them for relevant nodes.