Ported TreeFkPosSolver_iterative to UndirectedTreeSolver