Otherwise anyone could ask their lawyer to write them a note and use it as an excuse / a defense against criminal charges.
If you can't figure out if something is legal and if you go to an expert and they can't figure it out (or they're lying through their teeth), and you get punished for it, I feel like something is broken there.
That said, maybe she did know it wasn't legal, but we don't have enough information about the case to draw any conclusions from it.
It would if giving inaccurate was a criminal offense, but it isn't.