Distortion is done as a frame buffer effect, that is to say that the distortion only uses the pixels that have been rendered into the frame buffer.
There are two schools of thought on how to fix this issue.
One way is to use volumetric peeling, that is render within the volume first, then distort, then render into the frame buffer. This is really good as it produces correct distortion results (because pixels that aren't "visible" to the camera are available to the distortion algorithm). However, because you're rendering pixels that most won't wind up being on the final frame buffer performance is can get pretty bad.
Another way is to use distortion mask clamping. That is to say, you render a mask buffer which defines the limits of pixel sampling from the frame buffer for the distortion algorithm. Visuals isn't as correct as you get some texture stretching, since you may need to sample the same pixel twice or more ... but more often than not it isn't noticeable. However, because you're not rendering any more pixels than you need to, performance is pretty good with this one.