mkv: insert chapters upon various codec changes
mkv: fixed typo causing endless loop when chapters are created