Keystone XL pipeline advocates are trying to bolster their case by invoking the derailment and explosion in Quebec of a train carrying North Dakota oil, killing at least 15 people and forcing the evacuation of 2,000 more. The pipeline's opponents should push back, for two reasons.

First, the idea that Alberta oil not transported by pipeline will instead move by rail rests on the premise that oil-sands development will proceed at the same pace regardless of whether Keystone is approved. "Oil is going to get to market," as Canadian ambassador Gary Doer told a Bloomberg Government breakfast in June.

With all due respect to my ambassador, that's far from certain: Canada's own minister for natural resources, Joe Oliver, told Reuters in April that shipping oil by rail alone would limit oil-sands production. Goldman Sachs Group Inc. agrees, and told investors last month that "the potential for Canadian heavy crude oil supply to remain trapped in the province of Alberta is a growing risk" depending on new pipeline capacity.

If rejecting Keystone significantly constrains oil-sands development, the argument that no Keystone means more oil moving by rail becomes wobbly at best. But let's assume that Doer and others are right, and that oil will get to market one way or another. Doesn't the relatively higher likelihood of spills from derailments argue in favor of Keystone?

The problem with that logic is that it assumes the safety of rail can't be improved and is beyond the reach of policy fixes. But as Bloomberg News's Jim Efstathiou Jr. and Jim Snyder report, regulators on both sides of the border have long warned that the type of rail tanker involved in the Quebec explosion -- a type that makes up more than two-thirds of the U.S. rail fleet -- "ruptures more often in derailments than other models," and that the rail industry has opposed a National Transportation Safety Board recommendation to mandate retrofitting existing tankers, citing cost. The Pipeline and Hazardous Materials Safety Administration hasn't decided whether to adopt the NTSB's proposal.

Responding to the Quebec disaster by arguing for Keystone to be approved may serve the purpose of those who want the pipeline. But if we're worried about the safety of shipping oil by rail, the better response is to improve the safety of shipping oil by rail. This isn't just about Keystone; the vast increase in shale drilling around the U.S. has led to more oil moving by rail, and that will continue even if Keystone is built.

From 2012 to 2014, the capacity to offload oil from rail cars at refineries will expand by 840,000 barrels a day, including in places such as Albany, New York; Delaware City, Delaware; and Philadelphia, Bloomberg reports. If rail is unsafe, then building a pipeline from Alberta to Texas doesn't protect those places from future disasters.

There are reasonable arguments in favor of building Keystone. But last weekend's explosion in Quebec isn't one of them.

(Christopher Flavelle is a member of the Bloomberg View editorial board. Follow him on Twitter.)