anchor.diff:    | JsTypes.Object -> true && loc.InitUndefined
     | _ -> true
   
  +(**)
   let private makeWithExpr (name:string) (loc:Local) (typ:JsTypes) =
     let expr = EtTools.param name (match loc.ClosureAccess with
                                    | Read | Write -> StrongBoxType.MakeGenericType(ToClr typ)
                                    | None -> ToClr typ)
     { loc with UsedAs = typ; Expr = expr }
  -  
  -
  + 
  +(*'Demotes' a parameter into a normal local variable initialized to undefined*)
   let private demoteParameter name (loc:Local) =
     { makeWithExpr name loc JsTypes.Dynamic with ParamIndex = -1; InitUndefined = true; }
   
  +(*Resolves type for one variable, by name*)
   let rec private resolveType name (exclude:string Set) (locals:Map<string,Local> ref) =
     (!locals).[name].UsedWith
       |> Set.map (fun var -> getType var exclude locals)
       |> Set.fold (fun typ state -> typ ||| state) (!locals).[name].UsedAs
   
  +(*Gets the type of a variable, resovling it if necessary*)
   and private getType name (exclude:string Set) (locals:Map<string,Local> ref) =
     let local = (!locals).[name]
     if exclude.Contains name then JsTypes.None
  
positive.code: open IronJS.Types
  open IronJS.Ast.Types
  
  let private willBeDynamic (loc:Local) =
    match loc.UsedAs with
    | JsTypes.Double 
  
negative.code:               else var // Needs to be resolved
          )
        |> ref
        |> (fun locals ->   
          fix0 (fun next -> 
            match Map.tryFindKey (fun _ v -> v.Expr = null) !locals with
            | Option.None -> !locals // If we didn't find any, return the map
            | Option.Some(name) ->   // If we did
              let typ = (resolveType name Set.empty locals) // Resolve the type
              let local = makeWithExpr name (!locals).[name] typ // Make new local with type + expr
              locals := (!locals).Add(name, local) // Replace old one
              next() // Try next
          )
        )