If you follow the issue of immigration reform, you haven't had much reason to feel optimistic lately. After the bill written by the "Gang of 8" group of senators failed in 2013 — it passed the Senate, then died in the House — hopes of a bipartisan solution to the immigration problem quickly faded. Republicans realized that although passing comprehensive reform was essential to improving their image among Latino voters, the people who already supported them didn't want to see any legislation on immigration that you'd describe with any word other than "crackdown." Then came the presidential campaign, with a predictable contest to see who could offer the harshest rhetoric on immigration, a contest Donald Trump won running away.

But now there are some in Congress who think that after years of frustration, we might actually get a reform of our immigration laws and a solution to the problem of the undocumented immigrants now living in the United States. Last week Politico reported that members of the Senate are suddenly optimistic that 2017 could be the year it finally happens. "Several influential lawmakers see another opening for immigration reform in 2017, especially if Hillary Clinton wins and the GOP takes another hit among Latinos," they write. "Mitt Romney was hammered for his 'self-deportation' rhetoric four years ago. But that pales in comparison to Donald Trump's vow to remove 11 million immigrants here illegally and calling Mexicans who cross the border illegally 'rapists' and 'murderers.'"

In other words, the basic logic hasn't changed: Democrats are virtually unanimous in their support for comprehensive reform, but Republicans are torn. Increase the urgency of their national problem with a presidential election in which they get crushed among Latinos, and the more local problem of individual members of the House who fear upsetting anti-immigrant constituencies might be solved.

There are reasons to be skeptical, though. Republican leaders would still be asking their caucus to vote against their own interests by supporting reform. Most of them come from overwhelmingly conservative districts where the only question their constituents ask is how much tougher they'll get on immigration. The argument the leaders would make to their members — "You should vote for this bill because it's good for the party, even though your constituents hate it and it will probably mean you'll get a primary challenge from the right in your next election" — won't be much more persuasive in 2017 than it was in 2013.

There's one other key piece of this dynamic, which is that after 2016, the Republican caucus in the House is likely to be even more conservative than it is now. With Trump at the top of the ticket, Republicans will probably lose some seats, and where are those losses going to come? In swing districts, where their representatives are more moderate. So Speaker of the House Paul Ryan will preside over a caucus that is slightly smaller and more dominated by tea partiers.

Of course, if Trump were to win in November, none of this would matter. His election would almost certainly mean that Republicans also held on to both houses of Congress, a feat accomplished despite Trump's intensely anti-immigrant campaign. The only question Republicans would debate would be how tall to make the "Trump" letters on our new gold-plated border wall.

But that's not a particularly likely outcome. So let's consider the most likely one, which is that Hillary Clinton wins, Democrats take the Senate, and Republicans hold the House. While Democrats are hoping that an anti-Trump landslide could give them control of both houses of Congress, the House may be out of reach, simply because there are so few swing districts.

That would leave us with President Clinton, Majority Leader Chuck Schumer (a member of the original Gang of 8), and Speaker of the House Paul Ryan. Two out of three of them start eager for reform, which would be unlikely to face much difficulty in the Senate. The Gang of 8 bill passed in 2013 by a vote of 68-32, and while the next Senate will not be exactly the same as that one, there's not much reason to believe that it will be substantially more reluctant to pass reform, particularly after Republicans just lost an election in no small part because of the anger of the Latino electorate.

That will be a key part of the story that will be told about 2016, even if many in the GOP will insist that the party lost because it didn't nominate a "true" conservative, or that Donald Trump was such a uniquely repellent nominee that his loss contains no lessons for the party other than "don't nominate Donald Trump." The far more persuasive argument will be right there in the exit polls. Almost everyone understood that the GOP needed to improve its performance among the fast-growing Latino electorate in order to win the presidency, and when Trump loses Latinos by 80 percent to 20 percent or 90 percent to 10 percent, the facts will be impossible to ignore.

But you'd still have the problem of those Republican House members and their anti-immigrant constituencies. How could it be solved? The answer is simple: Paul Ryan could just decide to make it happen.

He might do it by working to win over some of the conservative opponents with a complex process of negotiation, in which they could be won over by the inclusion of beefed-up border control and improvements to the E-Verify system through which employers are supposed to check employees' immigration status (depending on the details, pro-reform Democrats would be just fine with that). But it's possible that most conservative Republicans would oppose any bill that provides a pathway to citizenship for the undocumented, no matter what else it contains.

In that case, Ryan could solve the impasse by giving his caucus a simple message: I know most of you would catch hell if you voted for this. But if we're ever going to have a chance of taking back the White House, we need to show Latinos we don't hate them, and passing comprehensive immigration reform is a necessary (if not sufficient) step toward that end. So I'm putting the bill up for a vote. Vote "no" if you have to, but it's going to pass.

Most of them would vote no — maybe two-thirds, maybe even more. But the rest, combined with almost all the Democratic votes, would be enough to pass the bill. And while it's possible that because of it, Ryan could face a revolt of the kind that continually beset John Boehner when he was speaker, he probably wouldn't have too much trouble surviving, particularly since no one else really wants the job. And then he could present himself as the kind of leader who can get things done in a divided Washington — the perfect first step for a presidential run in 2020.

That's a lot of hypotheticals, and we've seen before how difficult it can be to keep together the kind of fragile coalition you'd need to pass immigration reform. But it doesn't seem as crazy an idea as it once did. And if it happens, we'd have Donald Trump to thank.