Can a trace get the material in intersects with even if it is part of a layered material?

I’m using a grass and a dirt material layered on my terrain. They are both part of the same material and get applied based on slope angle. I’d like to set up a blueprint that places down some trees, and I’d like to be able to run a trace to check that there’s grass material underneath and only place the tree if that returns true. I’m not sure if I can use a trace to get a material that’s layered INSIDE another material however. Does anyone know if this is possible?