What is the contingency clause?
When you sell your home, the closing agency will have to satisfy the liens against the property in order. First mortgage gets paid in full first, then a Second mortgage would be paid, then any subsequent liens (IRS, mechanic liens, etc.) Before the seller gets paid anything.
The only time this would usually be an issue is if you were in agreement to sell for a price which would satisfy the first mortgage but not the second mortgage, in which case you are essentially entering into a short sale agreement with the Second mortgage company, or toy are bringing cash to the table to satisfy the Second mortgage.