There might be a silent bug in the Python module which directly reads from this type_set field; in particular, it does so when reading all controlling type variables, which all seem to be free variables (i.e. no parent typevar). So imitate this behavior here, until we're sure there are no other meta generators that rely on this.
This crate contains the metaprogram used by cranelift-codegen. It's not useful on its own.