> It is a minor point, but the icon starts out as locked here,

Does it ? It should be updated on line 114 just after. Start open for me. 
`fun(cell.metadata.ro)` set the icon to open if metadata.ro is undefined or false

>Subsequently, it is possible to get the cell into a state where you can't get it out of locked note.

Right, 'false' is true, while false is false... will fix.