Fix StackOverflowError with hashCode()