Added support for correctly exporting more than 10 sub-materials for a material library.