The special treatment is at the time of sale. My comments were in response to taxing the appreciation at the time of a new loan (such as taking a second mortgage).
The idea is to treat a loan against an asset with capital gains as a sale. So one would have to pay taxes out of the loan and then you get a stepped up basis.
The exact rules could be tweaked to keep it from being a burden on families taking a second mortgage, e.g. if you borrow less than a certain amount in the tax year perhaps the rule doesn't apply. Use your imagination.