Fix some errors caused by inconsistent use of hash table indices