Correctly compare relations with shared origin.

The previous implementation did not handle comparing relation sets that shared one endpoint, but not the other. If either endpoint was shared, the comparison function returned true, that the relations were the same. Now it will check to make sure that both endpoints, instead of just one, are shared.
I can't think of a big downside. It would mean sorting costs would be incurred every time, whether or not the endpoints needed sorting, but since I think most arrays will be length 2 (two endpoints) that's really not that much overhead. I wish I'd thought about sorting them, TBH, but now that I have it implemented this way I also don't see enough benefit to merit a switch.