Ensure valid hash codes for objects that don't have them set when they are constructed.