If you are borrowing against unrealized appreciation of more than the $250k that is exempt for a primary residence, you should be.
If you are borrowing to buy the house in the first place, then all of the capital gains have already been taxed, so it's not analogous to this scenario.
If you are borrowing to buy the house in the first place, then all of the capital gains have already been taxed, so it's not analogous to this scenario.