Use indexed for loop for nested shared resources

I am playing around with the content pipeline, trying to convert something I wrote with XNA to it. One of the resources I wrote an importer/processor for calls `WriteSharedResource()` inside its `Write()`. I don't know if that's good or bad but it worked with XNA. With MonoGame it creates an exception since the list of `sharedResources` gets modified inside a loop.

Converting to a simple indexed loop seems to make it work. I don't know much about how to test this part MonoGame beyond what my own code was able to execute.

I'm also fairly new to C# so if there's some better solution don't hestitate to suggest it. Still learning!