As long as we're pretending things that will never happen anyway, let's also pretend there's a Berne Convention 2.0 to cut out basically every suitable host country.
Alternatively, how about a law that no government-owned systems may directly or indirectly use any services where the source isn't available? That would be a big enough seed that the viral/transitive nature of the first law would probably spread to everything.
The thing is, everything I first described already happens. Software companies have been moving towards SAAS and online game servers and other ways of running key parts of the code only on their own systems for some time, and the initial motivation for that was often copy protection even if today there are other advantages from the developer's perspective.
Alternatively, how about a law that no government-owned systems may directly or indirectly use any services where the source isn't available? That would be a big enough seed that the viral/transitive nature of the first law would probably spread to everything.