Technically, the terms of the contact do matter.
Under today's rules, most institutions call this a purchase if the title hasn't transferred yet (when the borrower gets the "purchase" loan from the bank). If the title has transferred, most call it a "refinance".
Under the new rules, the contact terms are even more important. Commentary to §1003.2(d) #2 states:
. . .some transactions completed pursuant to installment sales contracts, such as some land contracts, are not closed-end mortgage loans because no credit is extended. For example, if a land contract provides that, upon default, the contract terminates, all previous payments will be treated as rent, and the borrower is under no obligation to make further payments, the transaction is not a closed-end mortgage loan.
There are more details in the section by section analysis, but in short, a dwelling secured loan or line to pay off a land contract will be reported as a purchase in 2018.