Just writing to a log will be easily missed.
The same is done in CTxMemPool::check() and other debug checks for developers, like lock order debugging.
Can be reviewed with https://en.wikipedia.org/wiki/De_Morgan%27s_laws and
git difftool --tool=meld cccc47b0ef~ cccc47b0ef