fixed the derived class contract for the case when a base class doesn't have a class invariant contract