Updated revertHashByPartition procedure.