Hash order is not guaranteed; sort them prior to iterating over them