MODE-2285 Corrected how the index providers are written out prior to shutting down

The prior changes to the XML reading and writing of index providers was not symmetric.