Improve error messages emitted by `resolve-additional-types` template.