Might be a good opportunity to introduce a helper function to get the main sitemap index, since this is done a number of places.