diagnostics: better location for type redeclarations