fix #5233

when passing a typevar with a concrete upper bound to inference, pass
the upper bound instead. this prevents confusion when later stages
believe something to be a concrete type and it's actually a typevar
instead.