[ty] Fix incorrect types inferred when unpacking mixed tuples (#23437)
## Summary
When unpacking a "mixed tuple" like `tuple[I0, *tuple[I1, ...], I2]`
with a starred expression (e.g., `[a, b, *c] = x`), ty incorrectly
inferred `I1` for `b` instead of `I1 | I2`. The variable-length part can
materialize to 0 elements, causing `I2` to shift into the `b` position,
so the correct type is the union `I1 | I2`.
Closes: https://github.com/astral-sh/ty/issues/947.