resolve nested rulesets