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.
Good point. I'll fix, then merge.