Fixing serialization tests that fail due to Object#equals() being dumb.