If a proximity phrase query overlaps with any other query term it will not be highlighted.
Example Text: A B C D E F G
"B E"~10 D
(D will be highlighted instead of "B C D E")
"B E"~10 "C F"~10
(nothing will be highlighted)
This can be traced to the FieldPhraseList constructor's inner while loop. From the first example query, the first TermInfo popped off the stack will be "B". The second TermInfo will be "D" which will not be found in the submap for "B E"~10 and will trigger a failed match.