Saving variables to global environment

Okay so this is weird, because in the instance mode version things worked, so I imagine setup() got called. But when using it in global mode it’s not even called. What would prevent it from being called in global mode?