Referring to background layers help

Hey all,

if (layer_exists("Mountains"))

Thats working great but I want to refer to its sub layers as well, I have selected "inherit sub layers" on my background layer but still doesnt seem to work also wont work if I put them in a folder and refer to the folder.

any help would be greatly apprectiated .