sha1_name.c: add support for disambiguating other types