Settings: Ensure fields are overriden and not merged when using arrays

In the case you try to put two settings, one being an array and one being
a field, together, the settings were merged instead of being overridden.

First config file
my.value: 1

Second config file
my.value: [ 2, 3 ]

If you execute

settingsBuilder().put(settings1).put(settings2).build()

now only values 2,3 will be in the final settings

Closes #6887
sorry I know realize my previous comment was stupid, I thought this method modified the incoming map ("settings") while it actually modifies the wrapped map ("map"). I don't think copying into an immutable map helps