Where are you seeing evidence of that? As far as I can tell, HOMEBREW_ARCHFLAGS remains an empty string before and after rebar is run. Even if it does unset HOMEBREW_ARCHFLAGS, would that cause *ENV/4.3/cc* to fail?

Anyways, I tried: 
```ruby
ENV["HOMEBREW_ARCHFLAGS"] = "#{Hardware::CPU.arch_64_bit}"
```
which made *HOMEBREW_ARCHFLAGS=x86_64* but the build still failed.

I also noticed that ejabberd is bundling rebar version 2.1.0-pre R16B 20130630_155424, so I tried replacing that with my own rebar 2.2 and 2.3 like this: 
```ruby
    rebar = Formula["rebar"].opt_bin
    ln_s "#{rebar}/rebar", "rebar", :force => true
```
which did make it use my newer rebar, but it still failed at the same spot.