Fix anonymous generic classes with annotations