backport SOLR-5190 from trunk to branch lucene_solr_4_3