Even if Labour replaces its leader, the Greens will probably carry on giving the government’s MPs restless nights