sparam inlining: Handle undefined sparams (#46703)
`_compute_sparams` is not required to be able to resolve an sparam,
it can leave it as a `TypeVar`, in which case accessing it should
throw an UndefVarError. This needs to be appropriately handled in
inlining. We have a test case like this in the test suite, but it
was being papered over by an incorrect check in can_inline_typevar.
Remove that check and implement proper undef checking in inlining.