Fixed rule duplication bug