fixes IndexSizeError when removing TextTrackCue's in TextTrackExtensions.deleteCues