Don't use slashes "/" as part of the shader name. It will disconnect it from the tree. I didn't understand why I couldn't connect a certain shader until I realised it was in the name. I guess the code looks at the actual name of the shader instead of a numerical interal ID (or something similar), which (being a coder myself) I would have done. The name should be nothing more than a property, not it's defining element (code wise that is).
same thing in maya, Maya also doesnt like spaces, if you have to in maya you can use and underscore but nothing else except alphanumeric characters :(