Transitive relatives in class model. Tests included.