Fixed bug where:

A fully checked section will lose its expand/collapse button after a mouse drag
Mouse drag causes resave()
In resave(), listToArray() automatically sets all checkboxes to have a false value in the array
checkForCollapsableSection() eventually sees that the checkboxes are "not ticked" in the array's data, and removes the collapsable section(s)

So the solution is to set the checked value in listItems [] based on the current checkbox state