fix LUCENE-5824 bug