Issue description
Researching https://issues.apache.org/jira/browse/GROOVY-11817 I discovered that switching to invokeDynamic and using @GrailsCompileStatic sometimes results in compile failures. This ticket is to add a functional test once the upstream Groovy fix has been made.