If I remember correctly, the mask render element doesn't pick up individual IDs from layered materials, only from the base mtl, so afaik there's no way to get 'automatic' masks from textures when using the LayeredMtl.
So let's say you Base Mtl has ID1, your Label Mtl (applied with a mask texture) has ID2 - the mask RE will not show ID2 masked accordingly to the texture mask.
Not sure about BlendMtl... you could test this one, but this one is quite finicky with many layers.