Small question regarding modifying engine classes

Hi all
I have no experience in C++ at all besides a brief foray into the basics some time ago so any help would be much appreciated.

For my 4.24 project I need the cable component to render using the custom depth pass stencil, an issue that seems to have come up before, and judging by this page on the issue tracker, one that will not be fixed by the UE devs.
However, in a previous thread regarding the issue, the user homembarataoffered the solution of adding the line: Result.bRenderCustomDepth = ShouldRenderCustomDepth();
to the GetViewRelevance function on the FCableSceneProxy class in the CableComponent.cpp
Hopefully showing that this was a simple oversight by the UE devs

Now, when I add that where I imagine it is supposed to go and then rebuild ue4, I see no change the in engine when I enable “render custom depth pass” as I would with a static mesh.
(example below of the cube with the output expected when “render custom depth pass” is enabled through my post process material)

Clearly I am doing something wrong and as I’m totally unfamiliar with the process of modifying classes like this outside of BP any help would be appreciated regarding what I need to do to get this change working.

Many thanks!