A few bugfixes for TypeEvaluator.