mkvmerge drops tags belonging to chapters from Matroska files other than mkvmerge
9.1 is the first release for which this happens and the obvious culprit is commit 43e0178c. You obviously forgot to modify the TagChapterUID in the same way as the ChapterUID so that they no longer belong to each other. chapter.end.new.mkv contains such tags.*
*: This file actually contains two Tags elements (legal according to the specs): One at the beginning and one at the end. Versions before 9.1 handled this well.