Custom depth outline draws over any object that doesn't have checked Render Custom Depth

I’m newbie in Unreal development and I want to draw an outline only around some actors on my level.

I have found a lot of tutorials about it, and all of them draw the outline using Custom Depth buffer. Here are some of the tutorials that I have found:

http://www.tomlooman.com/the-many-uses-of-custom-depth-in-unreal-4/
http://www.michalorzelek.com/blog/tutorial-creating-outline-effect-around-objects/
https://www.youtube.com/watch?v=IEHxjw6VEMQ

Now I’m working on the last one (youtube), and as you can see on second 0:43, the steps’ is hidden by the player:

CustomDepth03.png

This is because both, the player and the steps, have Render Custom depth checked.

This doesn’t happen on my level, because my player’s gun doesn’t have checked Render Custom Depth. Look:

CustomDepth01.png

But here, I have checked it on two squares:

CustomDepth02.png

The furthest square doesn’t draw its outline in front of the nearest square.

My problem here if I check Render Custom Depth in all of my actor, even in the ones that I don’t need it, I will have all of the outlined.

I need to normalize SceneDepth to only outline NOT hidden geometry. Any idea about how to do it?