As an indie developer myself, I can say that it's actually easier. If you're the sole owner of copyright for your game, or you share copyright with a small group of people, it's much easier to open-source your code. If you're worried about people stealing your work for profit, you can publish your code under a copy-left license like the GPL. Everybody wins, and nobody has to break the law.