[SP-998]: Backport of PDI-9848 - Mappings destroy metadata (when the Mapping input specification does not include all fields) (5.0)

There are fix and unit tests.