Nice solution Glen.
I was working on improvments to GIF animation handling in IM.
One of these planned improvments was a '-shuffle' image reording operator
(like -insert -delete and -swap operators). The reverse of that operator
would probably also be usedful for what you want to do.
However my own additions lost momentent due to a europian vacation and change in job description, so I am not sure when these new additions will be made. Stay tuned.
Or perhaps you would like to look at the source and contribute to the effort