It's not even a thought experiment, it's a philosophical debate on morals and laws vs freedom and whatnot. It's not an easy one, and it goes back decades if not hundreds of years; remember things like the Anarchist's Cookbook?
(Sidenote, there's a conspiracy theory that the Anarchist's Cookbook is intentionally wrong with some formulations to foil would-be bombers)