GROOVY-5959: @TypeChecked modified the AST tree in switch statements