Symbols that occur as pattern names in lhs are treated as local to the rule. This is true when the symbols appear on the right-hand side of conditions in lhs, and when the symbols appear anywhere in rhs, even inside other scoping constructs.
Rule constructs can be nested in any way. Rule is treated as a scoping construct, so that inner variables are renamed if necessary.