Description
This is a follow-up of LUCENE-6435: the bug stems from the fact that you can build term queries out of shared BytesRef objects (such as the ones returned by TermsEnum.next), which is a bit trappy. If TermQuery's constructors would clone the incoming term, we wouldn't have this trap.