What you're describing is "culpability" and it most certainly does get considered separately from intent (mea culpa vs mens rea). Not knowing whether or not you were within the boundaries of the law is only an excuse when you reasonably couldn't have ever known, with no opportunity for due diligence. Bureaucracy is not ever going to be a legitimate excuse for not knowing if you were acting within the law, because chances are that you could have verified so with any amount of effort.