So, what is the contract here between `equals` and `compare`? I would have expected that `s.compare(x, y) == 0 → s.equals(x, y)` but that invariant would be violated by this implementation.