This is due to missing `make_available` callback for Group ID socket. Use it to change the mode of the merge layer node so that socket is available in `connect_available_socket()` Pull Request: https://projects.blender.org/blender/blender/pulls/140251