If I were in this situation, without getting too technical, I would solve this from the design perspective.
1) Q1 -> A queue where all regular messages (1,2,3,4,5....) are placed.
2) Q2 -> A queue where the Error Fix messages are placed (1b).
And whenever there is an error, the next message will be read from the Q2 (until the error is resolved and get back to Q1)
This solves all of your problems mentioned:
i) You neither have to copy messages back and forth to and from temporary queue. (2,3,4,5), nor worry about order of messages.
ii) Further, you don't have to worry about messages that come after. (6,7,8...) as they will be placed in the queue Q1 after 5 (1,2,3,4,5,6,7,8).
P.S: I am not sure, how relevant will this answer be, to author of this posting, as posting seems to be an year old.however, the answer might at least help somebody who land on this posting in future.