Congress abolished the 40-year ban on oil exports this past week, a victory for oil companies and conservatives that few thought conceivable until recently. One thing made it possible: supporters absorbed the lessons of the Keystone XL pipeline, whose doom was sealed when it became a political battleground.

Supporters of lifting the export ban, including oil-state Democrats, cajoled potential liberal opponents, persuading them the policy change could work in their favor. They met repeatedly with skeptical Democrats, stressing...