Fixes #854

Explicit implementation of `==`, since the implicit one errors out.