How do you pass the depth buffer of a RenderTexture to a CommandBuffer

I have a RenderTexture with a depth component. I render objects and depth into it and verify this in RenderDoc. I then pass that texture to another shader like so

m_blitToScreenCommand.SetGlobalTexture( "_MainTex", m_overrideTexture.colorBuffer );
m_blitToScreenCommand.SetGlobalTexture( "_MainDepth", m_overrideTexture.depthBuffer );
m_blitToScreenCommand.DrawMesh( screenMesh, Matrix4x4.identity, customBlit );

However, when I check in RenderDoc, the shader is receiving two copies of the colour buffer. It doesn’t seem to matter if the camera is running in deferred or forward rendering. Unity version 2017.2

Here is the shader

Shader "Test"
    // Command buffers write to global keywords so "white" will always take priority because it is more specific than the global
    //	_MainTex ("Texture", 2D) = "white" {}
        Tags{ "Queue" = "Geometry" "PreviewType" = "Plane" }

        #pragma enable_d3d11_debug_symbols
        #pragma target 3.0
        #include "UnityCG.cginc"

        struct appdata
            float3 vertex : POSITION;
            float2 uv : TEXCOORD0;

        struct v2f
            float2 uv : TEXCOORD0;
            float4 vertex : SV_POSITION;

        sampler2D _MainTex;
        sampler2D _MainDepth;            

        v2f vert(appdata v)
            v2f o;
            o.vertex = float4(v.vertex, 1);
            o.uv = v.uv;
            o.uv.y = 1 - o.uv.y;
            return o;

        fixed4 frag(v2f i, out float out_depth : SV_Depth) : SV_Target
            out_depth = UNITY_SAMPLE_DEPTH(tex2D(_MainDepth, i.uv));
            return tex2D(_MainTex, i.uv);

            ZWrite on
            ZTest off
            Cull off

            #pragma vertex vert
            #pragma fragment frag

In Unity 2017.2 you cannot pass the color and depth of the same RenderTexture as separate parameters. The only thing that works is to have two separate RenderTextures where one is colour only and the other is depth only. You can then pass the colorBuffer of the first and the depthBuffer of the second and things will behave as intended.