   setUsedNames: (usedNames) ->
     @_scope().usedNames = usedNames
 
-  setAuxiliaryDefinitions: (compiledDefinitions) ->
-    auxiliaries = newMap()
-    for def in compiledDefinitions when def.definedNames
-      for defined in def.definedNames
-        addToMap auxiliaries, defined,
-          deps: unique def.usedNames
-          defines: def.definedNames
-          definition: def
-    @_scope().auxiliaries = auxiliaries
+  registerAuxiliaryDefinition: (usedNames, definedNames, def) ->
+    for defined in definedNames
+      addToMap @_scope().auxiliaries, defined,
+        deps: unique usedNames
+        defines: definedNames
+        definition: def
 
   auxiliaries: ->
     @_scope().auxiliaries

    if assigns.length is 0
      return malformed ctx, to, 'Not an assignable pattern'
    translation = map compileVariableAssignment, (join translationCache, assigns)
    translation.usedNames = ctx.usedNames()
    translation.definedNames = (name for {name} in ctx.definedNames())
    ctx.setUsedNames []
    translation
  else

      #log "compiling wheres", pairs wheres
      compiledWheres = definitionListCompile ctx, pairs wheres

      if body
        compiledBody = termCompile ctx, body

      # Data for a dependency graph is automatically registered when compiling
      # assignments (we use this to get a graph for the current where clause)
      nonLiftedWheres = concat findDefinitionsIncludingDeps ctx, ctx.usedNames()
      ctx.setUsedNames []

