Update sort consistency for heapIds