Fix equality ranking correctly!

The previous commit changed the behaviour to match the documented
behaviour, but sadly the desired behaviour is different from the
previously-documented behaviour!