Redeemable After Tax Cost of Debt

Hi, I am confused by which method is correct for calculating the after tax cost of debt.

In the CFA material we are taught to calculate the YTM using the IRR and then multiple this by (1-T) to get the after tax cost of debt. However, in separate accounting studies it is taught to calculate the IRR on post tax interest payments and it says that only the interest payments are tax-deductible and not any amortization of discount or premium. Link

The issue being here when the debt is trading at a discount or premium you get different answers, most notable with a zero coupon bond where there would be no tax shield under the non-CFA method.

Which way is theoretically correct in practice?

Thanks!