     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())
+    # directly add to dep graph
+    definedNames = (name for {name} in ctx.definedNames())
+    ctx.registerAuxiliaryDefinition ctx.usedNames(), definedNames, translation
     ctx.setUsedNames []
     translation
   else

  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

  auxiliaries: ->
    @_scope().auxiliaries

      #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 []

