I think the key thing is people doing things that aren't yet illegal, but probably should be.
I think we should simply backdate fines and punishments in this case. Ie. if you were doing something harmful to people or the environment but it was technically legal to do at the time you did it, you should still get punished (although a smaller punishment, especially if you can reasonably argue you didn't know).