Fix unnecessary memory allocation in BellmanHeldKarp::OptimalPath