Correct code generation when invoking a static method.