None the less, when we try to delete one, we start by removing the directive from all rules it appears on, and then try to delete it. It's desastrous in that case: we are ending with system rules missing their directive.

We should start by deleting the directive, and if and only if it works, try to delete the directive from rule. And nicelly handle missing directive in rules.

The other solution is to REALLY check where we want to actually modify system rules, and clearly seperate modify rules / modify system rules

Related issues

Related to Rudder - Bug #5875: It should not be possible to delete system directives