Okay folks, after discussing the underlying engine details here and on the VSL forum, and finding out just how amazingly robust the keyswitch response is, I delved into the code some more and finally got it working.
If you are interested, you can download the latest version here:
https://stash.reaper.fm/2134/Midi_Channel_Keyswitcher
PS Little tip: mixing up the NOTE_ON and NOTE_OFF values can waste loads of time.
PPS Something else I learned: it helps knowing that NOTE_ON messages with velocity 0 mean NOTE_OFF: updated in version 0.9.0107.