Fix #1027: Proper implementation of identityHashCode().