FIX: Some variables in SWITCH-RULE weren't local