ObjectId: ensure the calculated hashCode is not negative