Fix hash function

This didn't make much sense and caused a lot of hash collisions,
letting the hashtable degenerate into a linear list.

From: 11rcombs <rodger.combs@gmail.com>