Need to use pointer equality instead of `-isEqual:` (which is unnecessarily expensive, and might create false positives). It's documented in a comment in the implementation below.