gh-93345: Fix a crash in substitution of nested TypeVar after TypeVarTuple (GH-93346)


For example: tuple[*Ts, list[T]][int, str, bool]
(cherry picked from commit f545fc955aeb701ae4e73b07ff2283f823d857b8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 files changed