Can you have a leg level IOIID(23) in InstrmtLegIOIGrp? I don’t see a leg level tag for IOIID. The example is sending an IOI for a package of securities.
There is the generic LegID(1788) within the InstrumentLeg component already which is a component within the InstrmtLegIOIGrp component. I think that should work for what you need to reference a specific leg if you need to.