A patch-change that is concurrent with a note-on event should be sent before the given Note-on event. As follow up: CCs also need to be prioritize to send bank-select first. see also https://discourse.ardour.org/t/midi-strangeness-patch-setting-and-first-notes/101415