Technical: Pre-tax WACC = unlevered cost of capital (APV)

I can derive the pre-tax wacc from an infinitely recursive cash flow stream, but why is this equivalent to using the "unlevered cost of capital"? Because this discount rate assumes a constant leverage ratio (i.e. fluctuating debt levels), how can it be that the PV of unlevered cash flows give the value of a firm with no debt?