As discussed in Trac:14880, comment:123, we have the issue that we want to
avoid processing the same var more than once. The original plan was to move
closing over kinds to the very end of the tyCoVarsOfType function, however,
this turns out to be inefficient and unnecessary.
Instead, we simply change the code in ty_co_vars_of_type such that
closing over kinds doesn't happen if we've already seen the var in question.