bodyScope.removedFromAst();
if (bodyScope.hasParent())
bodyScope.getParent().removedFromAst(); // remove also arguments scope from tree
manipulator.removeFromBody(kid);
} else if (kid.getType() == ASTCssNodeType.DETACHED_RULESET) {
DetachedRuleset detached = (DetachedRuleset) kid;
IScope bodyScope = currentScope.childByOwners(detached, detached.getBody());
if (bodyScope.hasParent())
bodyScope.getParent().removedFromAst(); // remove also arguments scope from tree
bodyScope.removedFromAst();
detached.setScope(bodyScope);
} else if (kid.getType() == ASTCssNodeType.RULE_SET) {
RuleSet ruleSet = (RuleSet) kid;
if (ruleSet.isUsableAsReusableStructure()) {
IScope bodyScope = currentScope.childByOwners(ruleSet, ruleSet.getBody());
currentScope.registerMixin(ruleSet.convertToReusableStructure(), bodyScope);