Rendering customdepth from material to rendertarget broken after updating from 4.15

Creating a ghost effect with decay using CustomDepth and Draw Material to Render Target, and then using that render target in a postprocess material. Works perfectly in 4.15 but draws nothing (black) to render target in any version 4.16+.

Plugging a 2d texture into the emissive slot writes to the target fine, but SceneTextures like customdepth no longer write to rendertargets.

Plugging the customDepth directly into a postprocess material still displays, but rendertarget is needed for effects like distortion and decay