(diff_two_paths): minor optimization: exit loop ASAP.