Fixes bugs with record and item Solr document deletion.