Generally, personal loans count against you when applying for a mortgage. People tend to get into a habit of taking loans. But it'd be viewed differently when it was for a specific purpose like a house extension. But even from a psychological perspective, do you want to be left repaying a loan for an extension on a house you no longer own?
I'd focus on paying down the debt quickly, assuming you've enough equity / savings to cover the 20% deposit, and all fees.