[XmlProvider constructors] Don't allow to create invalid elements for heterogeneous arrays (closes #582)