@waylow Excellent!
The workaround I used was rendering my foreground object separately with a transparent background, and placing it on top of the rendered background with an Alpha Over. By default this had quite a noticeable “cut and paste” effect along the edges of my foreground object, which I reduced as best I could by using an Erode node with a negative value to feather my foreground object’s alpha pass. I don’t know if that’s the best way to go about these things though, there might be a better way.