Adhere to user-defined index ordering for comparators. fixes #1