Don't modify pass-by-value copy of opts on module refresh

This probably quietly broke a lot of other things with multi-master but
the issue in question is #10900

Closes #10900
Merge pull request #16457 from cachedout/issue_10900

Don't modify pass-by-value copy of opts on module refresh