Fixed highlighting on PDFs with watermarks and header segments out of order. Fixes #387