[ticket/11816] Fix define/loop checks in IF statements containing parenthesis

http://tracker.phpbb.com/browse/PHPBB3-11816