Pass by value or reference problem

Can't re-assign the whole in parameter, but re-assigning properties of
the in parameter works. Making it use the global variable directly
instead. Ugly!