Fix duplicated rule detection and exclude single such rule.