It's tempting to allow transfer of instruction array ownership, and clone phases into a temporary buffer while making an array of {index, count} so the insertion can start with the last and move backwards. But it's hard to justify the extra time to develop it versus cleaning up what we have.