 
     #log "ASSIGN #{ctx.definitionName()}", ctx.shouldDefer()
     if ctx.shouldDefer()
-      ctx.addDeferredDefinition ctx.deferReason().concat [to, expression]
-      return deferredExpression()
+      return deferCurrentDefinition ctx, expression
 
     if assigns.length is 0
       return malformed to, 'Not an assignable pattern'
     map compileVariableAssignment, (join translationCache, assigns)
   else
     translatedExpression
+
+# Pushes the deferring to the parent scope
+deferCurrentDefinition = (ctx, expression) ->
+  ctx.addDeferredDefinition ctx.deferReason().concat [ctx.definitionPattern(), expression]
+  deferredExpression()
 
 polymorphicAssignCompile = (ctx, expression, translatedExpression) ->
   assignCompileAs ctx, expression, translatedExpression, yes

    (word.ws or '') + colorize(theme[labelOf word], symbol)

labelOf = (word) ->
  word.label or 'normal'

collapse = (nodes) ->
  collapsed = ""

    @_macros[name.symbol] = macro
    name.id = macro.id = @freshId()

  # Creates a deferrable definition to be associated with given pattern
  definePattern: (pattern) ->
    if @isDefining()
      throw new Error "already defining, forgot to leaveDefinition?"
