However, the error message is just wrong: Error: Unmatched start tag 'label', pointing at the beginning of the label element. It took me quite a long time to understand what was happening: it would be nice to have it pointing to the div element instead and state that it can't be within a label element.
From https://github.com/ocsigen/tyxml/issues/322:
cc @MBodin