Fix bug in SWITCH handling of nested blocks