I think the error is because the parser generator thinks the detail table's "entry segments" are `LS` and the three `N1` segments below. This is a bug, because we shouldn't construct a detail table that starts with `N1` -- the table must always start with `LS`.

It seems to make an assumption that since `LS` is declared optional, the table doesn't have to start with `LS`. This is kind of tricky, because this assumption *is* value for non-repeatable tables (header and summary). The quick fix is to change your grammar to declare this as `Required`.