device->Clear() is not failing, removing the flag D3DCLEAR_STENCIL doesn't make any difference.
I think that the depth buffer is being MOVED to the depth texture, so the scene is getting rendered without depth? Have you tried to check my code in your own program?
The problem is only getting fixed when I remove the line:
device->SetDepthStencilSurface(pINTZDSTSurface);