Alternative to #6446

While discussion pull request #6446, @javanna suggested making `HighlightQuery`'s constructor protected instead of the proposed solution. This is an implementation of that suggestion, though I prefer the original solution.