             if let cachedResultingRules = cachedResultingRules { return cachedResultingRules }
 
             // Calculate value
+            let customRulesFilter: (RegexConfiguration) -> (Bool)
             var resultingRules = [Rule]()
             switch mode {
             case .allEnabled:
+                customRulesFilter = { _ in true }
                 resultingRules = allRulesWrapped.map { $0.rule }
 
             case var .only(onlyRulesRuleIdentifiers):
+                customRulesFilter = { onlyRulesRuleIdentifiers.contains($0.identifier) }
                 onlyRulesRuleIdentifiers = validate(ruleIds: onlyRulesRuleIdentifiers, valid: validRuleIdentifiers)
                 resultingRules = allRulesWrapped.filter { tuple in
                     onlyRulesRuleIdentifiers.contains(type(of: tuple.rule).description.identifier)
                 }.map { $0.rule }
 
             case var .default(disabledRuleIdentifiers, optInRuleIdentifiers):
+                customRulesFilter = { !disabledRuleIdentifiers.contains($0.identifier) }
                 disabledRuleIdentifiers = validate(ruleIds: disabledRuleIdentifiers, valid: validRuleIdentifiers)
                 optInRuleIdentifiers = validate(ruleIds: optInRuleIdentifiers, valid: validRuleIdentifiers)
                 resultingRules = allRulesWrapped.filter { tuple in

            )
        }

        private func mergedAllRulesWrapped(with sub: RulesWrapper) -> [ConfigurationRuleWrapper] {
            let mainConfigSet = Set(allRulesWrapped.map(HashableConfigurationRuleWrapperWrapper.init))
            let childConfigSet = Set(sub.allRulesWrapped.map(HashableConfigurationRuleWrapperWrapper.init))
            let childConfigRulesWithConfig = childConfigSet.filter {
                $0.configurationRuleWrapper.initializedWithNonEmptyConfiguration
            }

                newMode = .allEnabled
            }

            // Assemble & return merged rules
            return RulesWrapper(
                mode: newMode,
                allRulesWrapped: mergedCustomRules(
                    newAllRulesWrapped: newAllRulesWrapped,
                    mode: newMode,
                    with: child
                ),
