Stability of nearly-integrable, degenerate Hamiltonian systems with two degrees of freedom