A variational approach to the stability of an embedded NLS soliton at the edge of the continuum