remove globals in tests for compability with ?noglobals, to be enabled by default