s3: smbd: Fix incorrect logic exposed by fix for the security bug 12496 (CVE-2017...