This avoids throwing the deprecation warning when id and target are present and
have the same value, which makes a from_dict / to_dict round-trip throw no
deprecation warnings.
This allows running pytest with -W error:RawExtrinsicMetadata:DeprecationWarning
on other modules to migrate them away from the legacy attributes.