@Override
 public void visitAssignmentStatement(AssignmentStatement assignmentStatement) {
   LocalReference localReference = assignmentStatement.getLocalReference();
   String referenceName = localReference.getName();
   if (!localReference.isModuleState()) {
     if (!stack.isEmpty()) {
       assignmentStatement.setLocalReference(
           context().referenceTableStack.peek().get(referenceName));
     }
     if (assignmentStatement.isDeclaring()) {
       locallyDeclared(referenceName);
     }
   } else {
     locallyDeclared(referenceName);
   }
   locallyAssigned(referenceName);
   assignmentStatement.getExpressionStatement().accept(this);
   if (assignmentStatement.getExpressionStatement() instanceof ClosureReference) {
     ClosureReference closure = (ClosureReference) assignmentStatement.getExpressionStatement();
     GoloFunction target = closure.getTarget();
     if (target.getSyntheticParameterNames().contains(referenceName)) {
       target.removeSyntheticParameter(referenceName);
       target.setSyntheticSelfName(referenceName);
     }
   }
 }