Revert "Since we iterate over the hooks they come in sorted order, so expect them to be sorted"

This reverts commit 25e8e8ef299492f9798d665cfcf1ed96f54f20fa.