The example file
contains an example, in which there are two beam groups for subsequent notes. IHMO, two beam groups for subsequent notes should not be allowed.
If one wants to do properly to beam groups, one should use two voices, or, two segments, and invisible notes. It is really a hack and does not look familiar.