Put the document annotations into the right order.