GROOVY-6215: Incorrect type inference with flow typing and switch statements