Validating inheritance hierarchy.