Better type variable error reporting