handle flexible arrays at the end of structs, whose elements are themselves structs; fixes #1602