Fix potential exception on XML matching tagger when scrolling all the way to the end of the document