Value object hash handles anonymous classes.