fix encode_texpr for TVar

that's everything, right?