Improve operator==() logic.

Currently, if the first object has a field that the second doesn't, the two may still be seen as equal.