Prob not that way.
It is not a matter of paying out half the loan but for selling half the property and for the purchasing spouse to borrow to buy this half of the property.
I must disagree with you here. It is not really a mistake, it is just that things could have been structured so as to offer a variety of other benefits such as Rolf mentioned - mainly tax savings (considerable too) and asset protection.