fixed some type variable bugs in TypeInference (not enough freshness (!))
in orient, generalize type vars and clear scope between every rule