Fix bug which made global variables funky in dirt scripts