move static import resolving for NameExpr to its own method