If you can buy a place that you are comfortable living in for ~1x your income that would roughly cash flow as a rental, I would call that a no-brainer.
Monthly payments on a 400K loan would be in the 6-7% range of your income. Many people could afford that as a second home.
If you dedicated ~20% of your income (less than the average houshold devotes to housing) to paying off the property, you could pay it off in 5 years and own it free and clear and then go find your dream home.
Buying your unit or a similar unit to live in for a few years seems to be a low-risk obvious solution to me.