SOLR-7602: Check if SolrCore object is already closed before trying to close it in case of an exception during Core creation.