Refcheck: Improve error reporting in "type not found" case.