fixed clause generation in receive

I have identified the issue and propose a fix.  I checked that this correctly generates clauses for receives by compiling to core erlang.  You may want to handle this differently but this pull request should help you identify quickly where the problem is - it was indeed code reuse as you suggested.