fix #4471: renaming of nested `var` declarations