I don’t see a problem with the line you highlighted:
const int srcIndex = getBufferContaining (sourceNodes.getUnchecked (0),
sourceNodes and sourceOutputChans is not the channel number of the current node. Look how sourceNodes and sourceOutputChans is generated: it’s a list of all the sources for the current node and pin, i.e. the code goes through all the input pins of the current node. For each input pin it generates a list of sources (which consists of source node and the source node’s output pin) called sourceNodes/sourceOutputChans. It then uses the buffer of the first element of sourceNodes/sourceOutputChans as the buffer where it will later mix in the other sources. It doesn’t really matter which index it uses there (as long as it’s in the range of the sourceNodes array of course) - so it could have used 1 or 2 etc.
I don’t quite understand your comment about the other line of code you are showing:
if (sourceBufIndex >= 0
the zero’th sourceBufIndex is only the emptyReadOnlyBuffer in the case where the current pin has no input connections. The line you highlighted is only executed if the current pin has at least one input.
BTW: I don’t have a multi channel audio card lying around at the moment (I’ll try to grab one until the end of the week). But I couldn’t reproduce your problem with multi-channel surround plug-ins.