Improved error location precision in some type checking cases.