The obvious fix would be to make it like tax evasion (illegal) vs. avoidance (rational behaviour with a morally questionable extreme) - viz. to a large degree the line is up for interpretation, coming down to the spirit of the law and the motivation behind what was done.