verify-uselistorder: Make the verification logic easier to reuse