"I'm a security chief, not a lawyer!"
The discrepancy is probably due to heavy rewrites to the original script, which didn't involve Wesley as the focal point. And they missed it.
yeah, it's basically just a goof that was unfortunately left in the episode, ending up making Yar look like either an incompetent idiot or a liar.("Sure captain, of course I read up on the laws and legal system, I didn't blow it off to relax in the holodeck.")