DSpaceObject, SolrInputDocument) the comment suggests that withdrawn items should not be indexed. This was only true when discovery was used only for search. In current releases there is a browse withdrawn item function implemented using Solr. So comment and following if clause don't match.
The code is in line 131 and looks like:
// now index the new details - but only if it's archived and not withdrawn
if (item.isArchived() || item.isWithdrawn())