MDL-38228 upgrade: Fix broken sequences during upgrade
MDL-38228 upgrade: Identify corrupt sections with repeated cmids in sequence