Copy task Namesfactories before altering them

Copying before altering allows future modifications to make configs have
immutable Lists and Maps which will help avoid unintended modifications
of shared configs. Although this extra copying results in a bit of extra
copying work, safer sharing enables the way for config caches which can
lead to a lot less work being done.

Change-Id: Id04de8a459d504a9ee1c114c8eab0a3005b08390
3 files changed