Add hash code helpers
Implement equality and hashcode in IndexedValue

add index to hashcode