Preserve type variable names during type inference