Are you certain hash function works here as expected? It's not same as calculating sha-1/md5 etc .. 

"Return a hash value for the object.  Two objects with the same value have
the same hash value.  The reverse is not necessarily true, but likely."

So even if object has same value it is not guaranteed to have same hash.