Actually,, I take that back. Of course it is. Apparently we are all answering while it i late and we are over tired.
Had to read it over a couple of times, but the only thing I could lock on to was that '#type' probably wants to be 'checkbox', rather than 'checkboxes'. 'checkboxes' is not a valid form definition.
Best,
Will