Someone can definitely jump in here who may know better. I believe when you trade in your vehicle alongside another vehicle purchase it's not in the same boat as outright "selling" the vehicle.
I found this quote online: "If you own your car outright, the dealership will apply your trade-in amount to your new vehicle. For example, if you purchase a car for $25,000 and the dealership gives you $6,000 for your trade-in, you only need a loan for $19,000. And because the dealer knocked several thousand dollars off the final price of your automobile, you pay less in sales tax." (Source:
Money Crashers)
Since dealerships do this a hundred times a week, I'm sure they could answer any direct questions for you regarding your specific situation.