Test for cyclic DistToRoot bug.