Port-fix: Cherry-picking from Solr 4.8 resulted in invalid code.