Invalid scope and no test in scope give the same result

If the rule scope is invalid (i.e containing syntax errors), it gives the same result (NOTEST) as the correct scope that contains no test. We must discern this two cases.