FIX: objects are now correctly instantiated when nested in functions or iteration blocks.