As I understood it, htab_hash returns the index in which the node is stored. That index is stored as the value parameter for strings in the hash table, which htab_find returns.

The value is derived from the line

    return hash % size;

in htab_hash, and passed through htab_add, and is assigned to the node in htab_add_str. I have tested with up to 100 defines, and if I correctly understand the nature of the problem speculated, I may not have run into it yet.