Fixed ArrayOutOfIndex when both beams are at the end of the timeline.