fix wrong implementation of total disjoint inheritance