How can it be that Bernie Sanders could stand on the side of vigilantes on the border, against the auto industry bailout, against an immigration overhaul that would have eased the plight of people in the country illegally? Can this be the liberal senator his supporters know and love?

It can be because of the politically perilous way legislation works in Congress, as bill after bill becomes a grab bag of the good and bad — as lawmakers see it. Hillary Clinton took full advantage of that in the latest Democratic debate, pointing out votes by her opponent that are eye-raising on the surface while brushing off complexities that help explain them.

A look at some claims in the debate and how they compare with the facts:

CLINTON: While in the Senate in 2009, she voted for a bill that later provided the money to bail out the auto industry. "The money that rescued the auto industry was in that bill," which she chided Sanders for voting against.

SANDERS: That bill "was the bailout of the recklessness, irresponsible and illegal behavior of Wall Street."

THE FACTS: Sanders is correct. The bill passed in October 2008 provided $700 billion to bail out big banks. But some of that money was later used for a $23.4 billion bailout of Chrysler and General Motors. When Clinton voted for the Wall Street package and Sanders voted against it, neither knew money would be shifted to the auto industry. But now she cites the vote as evidence that he stood against Detroit. When an earlier bill came up explicitly to help the auto industry, both voted for it.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

___

CLINTON: Sanders "stood with the Minutemen vigilantes in their ridiculous, absurd efforts to, quote, hunt down immigrants."

SANDERS: "No, I do not support vigilantes, and that is a horrific statement, an unfair statement to make."

THE FACTS: She was right about his vote, perhaps a little over the top in characterizing it. In 2006, as a member of the House running for the Senate, Sanders voted for an obscure and largely symbolic amendment that sought to prohibit Washington from giving information to foreign governments about the activities of a civilian group operating along the border.

At the time, some hard-liners against immigration were concerned that U.S. officials were tipping off the Mexican government about movements of the civilian Minuteman group that was patrolling the border for people crossing illegally.

Sanders said it was an unimportant amendment "supported by dozens and dozens of members of the House which codified existing legislation." But it stands as an example of lawmakers backing something they might not like — or might not have given enough thought to — in order to achieve larger goals in a bill. As it was, the amendment did not survive and the issue was mostly forgotten — but not by Clinton.

___

CLINTON: "I think our best chance was in 2007, when Ted Kennedy led the charge on comprehensive immigration reform. We had Republican support. We had a president willing to sign it. I voted for that bill. Senator Sanders voted against it."

SANDERS: "Well, you have guest-worker programs that have been described by the Southern Poverty Law Center, one of the important institutions in this country who studies these issues, as guest-worker programs akin to slavery... They were cheated. They were abused. They were humiliated."

THE FACTS: Clinton is right that Sanders opposed the immigration liberalization, but that doesn't make him an opponent of that goal. As he explained it, the abusive guest-worker program contained in the legislation was so odious that he could not back the broader bill.

What Sanders did not make clear, though, was that his position also reflected concerns of labor unions that the temporary workers would drive down wages and cost Americans jobs. His stance was not all about the plight of the immigrant laborers, as a video played at the debate showed.