Static compilation fails when method is parameterized and there are varargs arguments which are not used in the call.
Simple classes to reproduce the problem:
It only occurs if a class with unfortunate method signature is written in Java and static compilation is enabled. Casting to the right type helps. Originally spotted with Gradle - `ExtensionContainer.create(...)`.