I know I am a bit late to the party (and congrats to you all on passing level II), but I think I can help here. Consider a leveraged firm (subscript L) and an unleveraged firm (subscript U), which are identical in every other aspect (i.e. identical EBIT, identical tax rate). Then we can write the value (V) of the two firms as
VU = FCFFU / r0 = EBIT*(1-t) / r0
VL = FCFFL / WACC with WACC = re*E/VL+rd*D/VL
where I have used that the value of the levered firm is equal to the value of debt plus the value of equity (VL = D+E). Now take the VL equation from above and multiply by WACC to obtain formular (A):
re*E+rd*D = FCFFL (A)
At this point you have to eliminate the FCFFL out of the equation. The difference between the unlevered FCFFU and the levered one is the tax shield effect of debt:
FCFFL = FCFFU+t*Interest = FCFFU+t*D*rd (B)
Discounting FCFFL at the appropriate discount rate (WACC) gives us the value of the levered firm. Alternatively we can discount the two cashflows at the right side of the above equation at their appropriate discount rates to get:
VL = FCFFL / WACC
VL = FCFFU / r0 + t*D*rd / rd = Vu + t*D or (alternatively) solving for t*D
t*D = VL - VU or (alternatively) solving for Vu
Vu = VL - t*D = D + E - t*D
This can then be used to rewrite the levered cashflow (B) as
FCFFL = FCFFU+t*D*rd = r0*Vu + rD*(VL - VU) = r0*VU + rD*(D + E - VU) = (r0 - rd)*VU + rD*(D + E) = (r0 - rd)*(D+E-t*D)+ rd*(D + E)
We can now insert into (A) to obtain:
re*E+rd*D = (r0 - rd)*(D + E - t*D)+ rD*(D + E)
re*E = (r0 - rd)*(D + E - t*D)+ rd*E
re = (r0 - rd)*(D/E + 1 - t*D/E) + rd
re = r0 + (r0 - rd)*(D/E)*(1-t)
Which is the formular you were looking for. Hope that was not too confusing 
As far as the initial solution of PierreCFA is concerned:
The problem with your way of doing it is that neither FCFF nor firm values for the levered and unlevered firm are identical in the case with taxes. The assumption r0 = rWACC does only hold in the case without taxes, because then the cashflows and values of the levered and unlevered firm are identical. And if both cashflows and value are identical so has to be the discount rate. This is no longer true with taxes. Without taxes WACC = const. whereas with taxes WACC is a function of the amount of debt in the capital structure.