MidiMessageSequence and updateMatchedPairs

Yes, the existing behaviour is deliberately done like that, because that’s how midi sequences work: a note-on following another similar note-on is never ignored.

But yes, your suggestion about returning the new object is totally reasonable, I’ll add that for you!