Fix for dynamically outputting newly created objects (e.g. variables when looping through a range)