Sequencing is asynchronous by nature and each uploaded file will be sequenced off a separate thread with no synchronization between the different threads. This means in your example, that if there is no xml_metadata node at the beginning and you upload several XML files at the same time each thread will compete & attempt to create the parent xml_metadata node resulting in several same name siblings.
I think the easiest solution in this case is to make sure the output node exists *before* you start uploading documents. You can very easily do this in your code or you can use an initial content file (see Initial Content - ModeShape 4 - Project Documentation Editor)
Perfect.. couldn't get better with the initial content feature....
Thanks for your time.