Store the index of the annotations' parent element.
Fix chapter links and viewport filter.