rules: lhs, nhs and rhs toplevel scopes fixed