Check if a path exists in ProblemSolver::finishSolveStepByStep