Fix inheritance cycle validation.