For now I kept originalMetadata as Map<String, Metadata> to match how buildProviders currently treats provider names as keys.
I agree a List<KeyValuePair<String, Metadata>> could better represent duplicate names; happy to open a follow-up issue to discuss that representation and adjust the metadata type there if we decide to support duplicates fully.
Originally posted by @Vishalup29 in #1765 (comment)