Fix handling of optional elements in XmlProvider when using multiple samples

Only fixed for Global=false, there's still a related problem when Global=true, but right now it's hard to fix that, as optionality handling is a bit chaotic. This needs to be refactored first, to remove the Optional flag from InferedProperty and move it to the type inference in a proper way