Further fixes to and refactoring of NameAnalysis

fix: no multiple method params with same name
refactoring: use recursive AST visitor base class