         contextType instanceof TempType
       # Typing deferred, use an impricise type var
       type = toConstrained ctx.freshTypeVariable star
-      ctx.addToDeferredNames {name: symbol, type: (mapOrigin type, atom)}
+      ctx.addToDeferredNames {name: symbol, type: (mapOrigin type, atom), scopeIndex: ctx.currentScopeIndex()}
       nameTranslate ctx, atom, symbol, type
     else
       # log "deferring in rhs for #{symbol}", ctx._deferrableDefinition().name

    @nameIndex++

  savedDeclaration: (name, scopeIndex) ->
    if scopeIndex is 0
      @_declaration name
    else
      saved = @savedScopes[scopeIndex]
      (lookupInMap saved.definitions, name) or @savedDeclaration name, saved.parent

  ## Deferring


    else
      throw new Error "assignType: #{name} is not declared"


  assignArity: (name, arity) ->
    (@_declarationInCurrentScope name).arity = arity

