It's (the repeating check) is now relying on the iterator returning sorted, so I think you must unconditionally pass iptiter_sort here.