Fixed GameObject destructor bug

A bug where each for loop using auto created a temporary GameObject and
called it's destructor on completion