CTAN has a new package: orderrefs