synced with lucene trunk to incorporate LUCENE-5176 fix