Thanks for catching this. Yes, the test does make the wrong assumption that the resulting comparators are guaranteedly not equal (in the sense of equal?).
To correct the test, we have to change at least one of the four arguments to make-comparator in the definition below. For example, we can replace `(comparator-hash-function comparator)' by the trivial hash function `(lambda (obj) 42)'.