performance optimization: adding a fast check to exclude rules that cannot match anyway; improves performance for German and French by about 20-30% on long texts