According to chapter 17 of Ross's Corporate Finance (Brazilian translation of 2nd edition),
$$ r_{WACC} = \frac{S}{S+B}r_S + \frac{B}{S+B}r_B(1 - T) $$
and
$$ r_S = r_0 + \frac{B}{S}(1 - T)(r_0 - r_B) $$
where $S$ is equity, $B$ is debt, $T$ is tax rate, $r_0$ is the unlevered cost of equity, $r_S$ is the levered cost of equity, and $r_B$ is the cost of debt.
By replacing $r_S$ in the first formula and simplifying, I get
$$ r_{WACC} = \Bigg{(}\frac{S + B(1 - T)}{S + B}\Bigg{)}r_0 $$
which would mean the weighted average cost of capital does not depend on the cost of debt, $r_B$. This formula yields the same WACC as the one in the book, and I checked on some other examples as well.
Did I get this right? If so, is this because the higher tax shield compensates the additional risk from higher interest payments? If not, what am I doing wrong?