Modify state by reference to allow removals through 'onBeforeStartTestSession'