Deductions & credits

It seems that the IRS Publication 551 specifically states that refinance costs can't be added to the basis.

Could somebody please clarify this?

Here is a quote from Publication 551 (highlighting is mine):

 

Settlement costs.

our basis includes the settlement fees and closing costs for buying property. You can't include in your basis the fees and costs for getting a loan on property. A fee for buying property is a cost that must be paid even if you bought the property for cash.

[...]

Settlement costs don't include amounts placed in escrow for the future payment of items such as taxes and insurance.

The following items are some settlement fees and closing costs you can't include in the basis of the property.

  1. Casualty insurance premiums.

  2. Rent for occupancy of the property before closing.

  3. Charges for utilities or other services related to occupancy of the property before closing.

  4. Charges connected with getting a loan. The following are examples of these charges.

    1. Points (discount points, loan origination fees).

    2. Mortgage insurance premiums.

    3. Loan assumption fees.

    4. Cost of a credit report.

    5. Fees for an appraisal required by a lender.

  5. Fees for refinancing a mortgage.