Handled path finding in the case where the start or end nodes did not
end up in the graph