Account for comparison with a GenericReferenceField dict in `equals`