i don't have much experience with multipass rendering but you could try to add the cnd line

def c0,1,1,1,1
def c1,0,0,0,0
...
cnd r0.a,r0.a,c0,c1 // if(r0.a>0.5){r0.a=1;}else{r0.a=0;}

to both passes? (of course you have to modify it so that it uses the correct alphachannel in both passes...)