When the nation's set to 0, it can be attacked by anyone (for NPCs, players won't ever be set to this) should be disregarded. I believe this is where "3" comes in, as the opposing neutral flag. This check should be applied to the other moral checks as well.