I don't understand this issue, because I never set the midi input assignment to anything, and just let it be to whatever, because while I have 2 midi controllers connected, I am only playing on one or the other while recording a single midi track.
When I use an instance of Kontakt, loaded with multiple instruments, Kontakt automatically assigns the next incremental midi channel number to each loaded instrument, so if I load: Piano, Organ, Strings, Bass, it will by default assign those midi channels to be 1, 2, 3, 4 respectively. The trick is to make sure to set the Midi Output Channel in each midi track to match the midi channel for the corresponding instrument in the Kontakt instance.
The Midi Output Channel parameter is just below the FX bin of each midi track, so for the Piano track I would set it to 1, Organ to 2, Strings to 3, and Bass to 4. Then, as each track is brought into focus, even with midi omni set, that is only for the INPUT - the output is filtered by the Midi Output Channel setting to only transmit the outgoing midi data on the assigned Midi Output Channel value. So, even with Omni, midi data triggered while the Piano track is in focus will ONLY trigger the instrument loaded into that Kontakt instance with its channel set to 1, etc....
As I change midi track focus, the default setting of Always Echo Midi On will DE-select the prior Midi Echo On, and set it on for the track focus moved to.
Because of the above, I never ever have any issues where any midi instruments are triggered errantly. It just works.
And when I want to hear myself playing a layered sound, I bring one of the desired midi tracks into focus, which sets that track's Midi Echo to On, and then I manually turn on any other midi echo buttons for other midi tracks I want to also trigger, creating whatever layer I am going after.
So, that is why I am confused - could it be that you are not setting the midi output channel for midi tracks that point to multi-timbral synth rack instances? (like Kontakt)
Bob Bone