On June 12, Republican Sens. John Cornyn and John McCain, along with Democratic Sen. Charles Schumer, got into an argument that was pretty heated, at least by the standards of the Senate floor. The subject of their debate was an amendment proposed by Cornyn to strengthen the border security provisions in the Gang of Eight comprehensive immigration reform bill.

Among other measures, Cornyn proposed adding 5,000 new border patrol agents, along with 5,000 new customs officers, for a total of 10,000 new security positions. The Gang of Eight bill would add no new Border Patrol agents at all, and 3,500 Customs officers, meaning Cornyn was suggesting creating 6,500 positions above and beyond the Gang bill.

That was too much for McCain and Schumer, both Gang members. "If you are adding either additional border patrol or customs agents ... where does your money come from?" McCain asked Cornyn. "We are talking about personnel costs that are incredibly expensive."

Cornyn said he would use funds already provided for in the legislation. McCain scoffed, suggesting Cornyn had no grasp of "first-grade mathematics."

"I think it is incredible that the senator should stand there and say, 'Yeah, we are adding these thousands of personnel, but there is no additional cost,'" McCain said. "That is not possible."

Then Schumer jumped in. If the government had to pay for those 6,500 new positions, he argued, there would be no funding left for drones, fencing, and new technology to secure the border. "We do not have that kind of money," Schumer told Cornyn. "Its cost goes through the roof."

And the problem went beyond cost, Schumer and McCain said. The U.S. simply doesn't need that many more border patrol agents, and hiring them would be both ineffective and a waste of money. "Most experts have told us [border patrol agents] will not do close to as good a job as the drones and the helicopters and the more mobile assets," Schumer said.

So imagine Cornyn's surprise when, eight days later, McCain and Schumer took to the Senate floor to celebrate a new plan that would add not 5,000, not 10,000, but 20,000 new border patrol agents on the U.S.-Mexico border.

The plan was part of a new amendment, authored by Republican Sens. John Hoeven and Bob Corker, that sought to strengthen the Gang of Eight's security plan in a way that could win both parties' support. "The idea that broke the logjam is the border surge," Schumer said. Adding 20,000 new border patrol agents, he declared, is an idea "breathtaking in its size and scope."

Cornyn stood nearby, incredulous. "My amendment was disparaged by the distinguished senior senator from Arizona and the distinguished senior senator from New York as being a budget buster," Cornyn said, his voice rising. "I was told we don't need more boots, we need technology. Now, I find to my shock and amazement, the distinguished senior senator from Arizona saying we need 20,000 more border patrol." His voice rising to a shout, Cornyn challenged: "How much is it going to cost?"

The answer appears to be about $30 billion, a number McCain and Schumer would have said was insane just a few days ago. Now they were rejoicing. What had changed?

The Gang of Eight senators pointed to the new Congressional Budget Office report which claims immigration reform will reduce the deficit by $175 billion over the next 10 years. As the Gang sees it, that's money to spend. The CBO report, Schumer said, "gave us the budgetary flexibility to consider massive new investments in border security."

But Schumer had also argued that adding new border patrol agents was both ineffective and wasteful. No longer.

What was going on? The fact that Schumer and McCain flip-flopped so dramatically suggests there might have been some other factor at work in their change of heart. And there was. The issue wasn't about money, it was about triggers.

The Gang of Eight has always resisted any proposal which says the border has to be measurably secure - say with a 90 percent apprehension and turnback rate for attempted illegal crossers - before today's illegal immigrants are allowed to become permanent legal residents of the U.S. The Cornyn amendment had such a provision, and Gang members pronounced it a non-starter. The new Hoeven-Corker plan has no such hard requirements, and it is acceptable, even if it means spending billions in ways Gang members have denounced as needless.

The point for the Gang is to make sure no border security obstacle stands in the way of the legalization of today's illegal immigrants. For Schumer, McCain, and their colleagues, that's far more important than consistency.

Byron York, The Washington Examiner's chief political correspondent, can be contacted at byork@washingtonexaminer.com. His column appears on Tuesday and Friday on washingtonexaminer.com.