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.
I've actually got a book which contains full synopses of every early draft script from TNG's first season. John Black's original version of "Justice" seems like it could have been one of the most intriguing, even if it does
riff very much on the TOS episode "Return of the Archons".