Fix overflow in frame index of incoming MIDI events.