[SSSD] [sssd PR#5746][+Pushed] p11_child: do_card partially fix loop exit condition (redo of #5705)