SONARJAVA-593 Correct resolution of type arguments