Fix QC bug that clips ports on patches publishing an interaction port

If the interaction port is published as an output, and the patch has more input ports than output ports, the last input port will be clipped. The opposite is also true. This change works around this issue by performing special layout in these cases.