Despite loss, Pelosi won for Dems