Best I can figure is you are reporting that:
You can not select a midi track from a midi style to be inserted into a RT style when the midi track you want is on a Utility track of a midi style. Instead you can only select midi from a legacy track of the midi style.
No surprize to me. Historically, midi files only generated midi on legacy tracks. In fact, I suspect that is true today. So this restricted menu option is by design.
But, I am struggling to comprehend all this code as much or likely more than most of us!