Ministers and factional heavyweights worked behind closed doors to squash an attempted revolt over Israel and Gaza.