<!--#perl--> was being allowed even in the IncludesNOEXEC case because of wrong logic in an if statement.