It’s not uncommon for legislators to become confounded during political deliberations. However, for the Canadian Senate, the source of the confusion is rather unusual—they keep debating the wrong version of bills.

This month, the Canadian Senate was debating C-8, a bill that contains modifications to Canadian copyright law. The bill had been shelved since January because clauses in it had to be renumbered, explains the Ottawa Citizen. But before the bill reached the Senate for a vote this fall, another bill became law during the summer and that changed the numbering of the clauses again, rendering C-8 inaccurate.

When the Commons voted to send C-8 to the Senate, no one noticed the version control issue, so the Senate began debating the wrong bill.

It gets worse.

The same situation had already happened with the Senate earlier in the year. In August, the Senate had to re-introduce bill C-479 after the House of Commons sent the wrong version of the bill to the Senate. “The Commons’s mistake affects a key government priority—victim rights—by leaving out four amendments approved for the Fairness For Victims Act,” wrote the Globe and Mail. “Parliamentary experts say they have never heard of such an error being made before.”

So how can the Canadians get a grip on their version control issues? Some suggest it’s time to implement a document management system—for more governments than just Canada.

Typically, version control is thought of in the context of programming and other development topics, particularly in open source, where multiple people might work on a single project over the course of months or years. Increasingly, however, it’s becoming important—particularly in collaborative environments—to implement version control in other areas as well, including documents. Users, for instance, would be required to check out a document and then check it in again.

Obviously, one such area is legislation. As one commenter to the Canadian incident remarked, “A simple document management system solves this problem nicely. The kind of thing you’ll find in any law firm. Too bad there aren’t any lawyers in politics.”

Actually, the idea of setting up version control systems for legislation and the law isn’t new. Sources ranging from a 2006 DailyKos discussion to a 2011 Quora discussion to a 2012 TED talk by Clay Shirky have tossed around the notion of a “GitHub for law,” while organizations such as the Sunlight Foundation have also tracked such developments.

“Proponents of applying version control systems to law have a powerful vision: a bill or law, with its history laid bare and its sections precisely broken out, and real names attached prominently to each one. Why shouldn’t we be able to have that?” writes John Wonderlich, policy director for the Sunlight Foundation. “And since version control systems are helpful to the point of absolute necessity in any collaborative software effort, why wouldn’t Congress employ such an approach?”

One problem, Wonderlich notes, is that the legislative process itself is already a version control system. “Most US Code snippets have far more documentation and history that can be attached to them than most contributions to github—a history of legislation, amendments, hearings, floor speeches, testimony, votes, conference committees, etc., all go into even tiny changes of how the law functions,” he notes.

The other problem, cynics say, is that legislators don’t always want constituents to be easily able to see what’s been changed. “The idea is fine and good, which is why it is unlikely to be implemented,” noted one commenter in a Slashdot discussion on the subject. “After all, if you can filter changes and search by text, then how are you going to hide riders in your bills?”

Meanwhile, what of poor C-8? Well, it’s hard to tell. There hasn’t been any further coverage of it in the Canadian news media, and according to the Canadian Senate web page, the day after the problem was reported in the media, all proceedings on the bill were declared null and void.