* lib/idcache.c: Restore most of the 2006-11-06 patch, so as to