Bugfix for deque usage.

If erasing from empty deque, the behavior is undefined and (in practice will give maxint as size with new GCC and lattice_rescore stopped working.)