Ensure order for query keys in an ordered-map