Fix complexity of compute_root_causes

Closes #1252
Merge pull request #1254 from OCamlPro/fix-causes-complexity

Fix complexity of compute_root_causes