Nobody expects a coherent and consistent trade policy from President Donald Trump. But sometimes incoherence and inconsistency are to be welcomed. Trump has apparently directed his trade advisers to explore rejoining the Trans-Pacific Partnership. This instruction contradicts much of what has gone before—and is, in other words, a very good idea.

Trump dumped this painstakingly negotiated pact immediately after taking office. The remaining 11 members wisely decided to go ahead anyway. If the U.S. does take part, the pact would encompass 40 percent of global production and one-third of world trade. It would bind the world’s largest market to its fastest-growing economies, realigning supply chains and cementing U.S. economic influence in Asia even as China’s grows. It would reassure allies in the region that the U.S. presence will endure. It could help spur further trade liberalization worldwide, largely on U.S. terms.

None of that moved the president to change his mind a year ago. At a meeting on Thursday to discuss the plight of American farmers, Trump said he was thinking again. Farmers face retaliation from China if the U.S. goes ahead with the tariffs it has threatened on Chinese goods. They’d gain a lot from the lower tariffs mandated by TPP, especially in the long-protected Japanese market. Liberal trade has benefits for the U.S. after all. Who knew?

Rejoining TPP would also help the U.S. on that very question of managing the economic relationship with China. The U.S. and its partners have legitimate complaints about China’s bending or breaking rules on international trade—for instance, with state-directed subsidies to national champions, barriers to suppress foreign competition, pressure on companies wishing to do business in China to give up sensitive technology, and outright cyber-theft and commercial espionage.

Threatening trade war, much less actually waging it, is not the best way to make China a rule-abiding economic partner. Far better for the U.S. to lead a coalition of nations that sets high standards for digital trade and protections for intellectual property—that is, the TPP.

Especially with renewed U.S. participation, the pact’s membership and influence would continue to grow. China would have to raise its standards to avoid being left out and put at a disadvantage. In the shorter term, the mere possibility that the U.S. might rejoin this project could give the Trump administration leverage in its trade negotiations with Beijing.

Coming home to TPP is only a small part of what the U.S. needs to do to get its trade and economic polices in order. And joining TPP now won’t be straightforward: After Trump stepped aside, some measures favoring the U.S. were suspended. Still, it’s likely that the other partners would compromise on those points to get the U.S. back in. That would be good for all concerned.

President Trump just had a good idea on trade. Enjoy it while it lasts.