Improve diagnostic.

"Use type as variable" error now indicates
the source position leading to the error,
as well as the location of the type definition.