Revert using hashes instead of equality checks

This reverts commit 763232b5f65abcaeede028dc505879946c727b7e.