Bug in preloaded config when called multiple times

I introduced a bug in the preloaded config code due to some careless array mutation. Fix + regression test.