Then let me explain my logic.
Normally, if a man owns a house outright and marries, he could change ownership to joint with his wife without any Stamp Duty implications, since he would in effect be gifting half the house to his new wife. Because a gift is a zero-consideration transfer, it is exempt from Stamp Duty, since SD is assessed on the value of the consideration, not on the value of the asset.
The trouble arises when the man doesn't own it outright, but when there is a mortgage. In this case any formal transfer of part ownership would also involve the wife becoming a party to the mortgage, and this would be deemed as consideration, because the wife is agreeing to take on joint liability for the loan, so we'd have "negative money" changing hands in the direction from wife to husband.
Now, if "positive money" *were* to change hands in the same direction as the "negative money", by the wife "paying" the husband enough to discharge (in full or in part) her liability up front, then she would no longer be taking on as much (or even any) liability, and this money would partly or fully neutralise the value of the deemed consideration for SD purposes. That's the plan, at least. I hope it wouldn't backfire and be seen as two transactions (both of the value of half the mortgage loan),
*both* of which would be subject to SD.
Market value is irrelevant, since SD is assessed not on (half) the MV of the house but on (half) the actual balance outstanding on the loan at the time the wife becomes joint mortgagor.