Add test with preserveGlobalState disabled