     index = 0
     cd = topCD
     while cd
-        scope = cd.scope
+        scope = result.scope = cd.scope
 
         # default watchers
         total += cd.watchList.length

    catch e
        alight.exceptionHandler e, '$scan, error in expression: ' + result.src,
            src: result.src
            result: result
    result.mainLoop = mainLoop
    result.totalChanges = totalChanges

    result.total = total
    result.changes = changes
    result.extraLoop = extraLoop
    result.scope = null
    return


