Keep dictionary entries sorted when updating the value

Merge request reports