Just look for the material variable and set it to an unused integer.
If Material = 1, then the mesh is using the first texture.
If Material = 2, then the mesh is using the second texture.
If Material = 3, then the mesh is using the third texture.
And so on.
Just change the number one more than the number of currently used textures.