[ticket/12518] Apply De Morgan to make the conditions easier reasable

https://tracker.phpbb.com/browse/PHPBB3-12518