Deal will allow lenders to exit one of toughest merger-finance transactions in recent years