OK.
I think this is a bug in 5.7.
All previous versions (although I have not tried this in 5.6) that I have used going back to 3.3.1 have allowed for optional segment/groups to ‘collapse’ when a reference is made ‘skipping’ over previous segment/groups.
In your example starting the creation of a new optional segment/group at somewhere other than zero should mean that the reference being made ends up being the first repetition (assuming no prior repetitions actually were populated).
If the definition is required, then I would expect empty segments to be created ahead of the referenced repetition.
As I said I think this is a bug. Would you consider reporting it?
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.