Fix bug where modules were installing

When the installer is run, only the site module should be installed.
In the previous version of the code, we were manipulating items in the
array as it was being traversed (!). This version creates resultsCopy
to hold the result of our desired manipulation.