bugfix: reset last index of global regexp properties in findSwitch