Use #hash instead of #dup for comparing serialized
attributes