Sampled Blur problem / compositor

I have an animation with a movie background. I’m combining these in the compositor. Unfortunately when I use Sampled Motion Blur the blur is only being performed on the render layer, not on the final composite output. It’s nearly correct, but obviously the blurred sections don’t look correct if they are against very dark or very light backgrounds in the movie because the effect is being created by blurring against the Horizon colour in the render layer, not against the movie background.

I would have thought the blur would occur as a post process after the compositing has finished, but it looks like there is no choice and Blender performs it on each render layer before compositing. Is there any way to force this after compositing? Basically what I want is to tell Blender when to perform the Sampled blur in the compositor pipeline - in my case right at the end when the final image is created.

BTW, vector blur is not an option in my case as the results look incorrect due to the nature of the animation.

Why don’t you use straight alpha mode? (Render buttons: Shading: Alpha - Straight).

Ah. Yes, I did look for a way to set the sky to be alpha - didn’t spot this.

Thank you!