erlware/joxa — pull request #65 by vejmelkam (2014-02-13 03:59:12+00:00)
Title: 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.