Nancy Pelosi's gambit pays off better than she could have hoped