Split reference indices from layer indices; the former is only needed in flexible mode, the latter for all scalable.
Add descriptions of non-flexible and flexible mode.
Explain what a zero-length PATTERN LENGTH means.