fixed config substitutions within set objects
Previously we were modifying the set, which could lead to an error due to iterating over it at the same time. We now make a copy and overwrite the original
Previously we were modifying the set, which could lead to an error due to iterating over it at the same time. We now make a copy and overwrite the original