Fix overlapping burnt-in subtitles in some cases (#959).