Use patched version of TermsFilter to prevent using wrong cached results

See LUCENE-5502

Closes #5363