Properly expand type in generic class with Self and TypeVar with values (#14491)
Fixes #14374
It looks like we need to special-case `Self` in `expand_type()` to
support it in generics over `TypeVar` with values, since `Self` is the
only type variable that can legitimately have other type variables in
its upper bound.