RulesRegistry::CheckAndFillInOptionalRules has:
// IDs we have inserted, in case we need to rollback this operation.
std::vector<std::string> rollback_log;
The intention here is to keep a set of IDs that are used as we insert rules, so that if something goes wrong we can remove them. The problem is that we never insert anything into that vector, so if there is an ID collision, no used rule identifiers are ever removed. There also appears to be no test coverage for this case which would have found this problem.
(FYI, this doesn't appear to be a regression; this code has not changed significantly since its introduction in https://codereview.chromium.org/9315010 .)