Your loans were made at the height of the housing bubble, and looked like a great deal at the time. By using a HELOC as a "piggyback" second mortgage, you were not required to make a down payment or to purchase mortgage insurance.
Whatever the reasons for the move, many face the same challenge: how to use the equity in their existing house to purchase the new one before completing the sale of the old one. Selling the old one first avoids this problem but requires two moves, which is a major expense and a hassle.
There is no right answer in choosing any of these scenarios. Your Realtor may be able to advise which is best, depending on the local market. However, much depends on your financial stability, as well as your tolerance for risk or disruption.