Slightly improved treatment of type variables. Things like fib are still broken =(