Make sure $rulesets contains only arrays.