Halo/border in masked images
You're in the right track, but the implementation is wrong.

Your screenshot shows that you're combining pairs of plates together, and mix the result with an alpha over node, and that's not correct.
What you have to do here is add ALL the plates together.

So, let's say you have your renderlayers A, B, C and D.

What you need to do is add A+B, then add the result to C. The result of A+B+C has to be added finally to D.

The same goes for the alphas.

Instead of that yo are doing A+B, then C+D, and alpha over the result of one on the top of the other, which is wrong.

Start over, remove ALL the alpha over nodes, only use adds.
The only node that is not an addition you should use is only one set-alpha node, to assign the added alphas to the added RGB.