Why does the Bellman-Ford algorithm give a right answer even for negative weights, provided no negative cycles exist?