Render Layer showing through other Layers I have a question about render layers.
When I use the compositor to connect the layers together my first layer is always seen-through. For instance I can still see it in rendering even if the object is behind a wall and such. I'm pretty sure it is something simple that I'm missing so any help would be well appreciated

Screenshot of compositor: 



I've tried fiddling around with different nodes but nothing seems to work

Screenshot showing issue:
Apparently after fiddling with the scene properties I somehow got it to work, by giving the layer that the object was on a mask layer and then ticking 'all Z' the objects stopped showing through other things. Thank you all for your help on this