When saving from tabs, the program checks if the Encryption Constant should be forced to an expected legal value as a result of the Gen5->Gen6 transfer process; a common user mistake->automatic fix. When requesting legality, the program needs the latest pkm data, so it runs it through the saving function before checking.
These automated fixes are very infrequent and are often tied to the GUI (like bounds checking against the loaded lists) so it's not something you can call in an automated fashion with the batch editor.
You can spend the time making a batch script that does something like
=Legal=false
=Generation<6
.EncryptionConstant=*PID
But it won't be foolproof. If there's not too many, you can just view&set each slot yourself. I suggest using the keyboard shortcuts (control-click to view, shift-click to set), which are described in the About form (accessible in the dropdowns), which is also where control-rightclick Legality (as previously mentioned) is also listed as a tip.