Report missing type definition dependency only once per type.
Error reporting improvements
Fix reported warning location
Add new test