I think this is faster then the double checking for inclusion. When you look at TypeEqualitySpecializationUtils#areTheSame(Type type1, Type type2), first it checks whether type1.equals(type2).
The additional logic is applied only if this is not true and both types are also instances of ParameterizdeType or instances of TypeVariable<?>. And this is exactly the case when we need to apply the additional logic as the java equality does not work "our way" in this case.