Is it possible to loopback from node group output back to input?

I am trying to create a node group that allows for customizing part of its internal data flow. The problem is that Blender doesn’t seem to want to allow it (see attached image): Most of the time, this node group should have a direct connection from mcShaderDiffuse->BSDF to Mix Shader->Shader 1, however there are specific cases where I want to be able to modify the BSDF output before plugging it into the Mix Shader.

Seemed simple enough: create an input and output on the node group and in the normal case, just loop the output back to the input. And for the special cases, I can add nodes as needed to the path. The problem is that Blender doesn’t seem to want to allow that. It will not let me create a loopback connection directly. When I try to fake it by inserting an add 0 node (background image), the connection turns red which I assume indicates an error. I get that it’s probably trying to prevent me from creating a cyclic graph, but that’s not what I’m trying to do here. So is there a way to do what I’m trying or do I just need to separate the two use cases into different node groups?

Attachments


Just a quick followup thought: instead of directly exposing the input and output, I could put another node group in the path. But then how do I expose the inner node group selection to the outer node group?