We should use custom serialization and deserialization to recompute the cached hash code unless we can guarantee that they are stable.