To those who are bothered by this inconsistency, there is a way out. You could do a conventional valuation using market value weights for debt and equity, but then use the estimated values of debt and equity from the valuation to re-estimate the cost of capital. This, of course, will change the values again, but you could feed the new values back and estimate cost of capital again. Each time you do this, the differences between the values you use for the weights and the values you estimate will narrow, and the values will converge sooner rather than later.
How much of a difference will it make in your ultimate value? The greater the difference between market value and your estimates of value, the greater the difference this iterative process will make. That is why it makes the most sense when valuing private companies (where there are no market value weights to begin with).