I am cloning preventively here, to avoid any possible corruption of the config data elsewhere.
The problem we saw yesterday was related to the array in the map function overriding itself, so we still need the else condition.