[1.x-branch 1/1] Update partedPartition before (un)setting partition flags