Improved GeneralizedBeam.
sequencetools.rotate_sequence now works with empty sequences.