anchor.diff:  
                   getDocumentHandle singleDocumentIndex, metadata.GetOrAddBlob(builder)
   
  -        // Write the scopes 
  -        let mutable lastLocalVariableHandle = Unchecked.defaultof<LocalVariableHandle>
  +        // Write the scopes
           let nextHandle handle = MetadataTokens.LocalVariableHandle(MetadataTokens.GetRowNumber(LocalVariableHandle.op_Implicit(handle)) + 1)
  -        let rec writePdbScope top scope =
  -            if top || scope.Locals.Length <> 0 || scope.Children.Length <> 0 then 
  -                lastLocalVariableHandle <- nextHandle lastLocalVariableHandle
  +        let rec writePdbScope scope =   
  +            if scope.Children.Length = 0 then
                   metadata.AddLocalScope(MetadataTokens.MethodDefinitionHandle(minfo.MethToken), 
  -                                       Unchecked.defaultof<ImportScopeHandle>, 
  -                                       lastLocalVariableHandle, 
  -                                       Unchecked.defaultof<LocalConstantHandle>, 
  -                                       scope.StartOffset, 
  -                                       scope.EndOffset - scope.StartOffset) |>ignore
  +                                        Unchecked.defaultof<ImportScopeHandle>, 
  +                                        nextHandle lastLocalVariableHandle, 
  +                                        Unchecked.defaultof<LocalConstantHandle>, 
  +                                        0, 
  +                                        scope.EndOffset - scope.StartOffset) |>ignore
  +            else
  +                metadata.AddLocalScope(MetadataTokens.MethodDefinitionHandle(minfo.MethToken), 
  +                                        Unchecked.defaultof<ImportScopeHandle>, 
  +                                        nextHandle lastLocalVariableHandle, 
  +                                        Unchecked.defaultof<LocalConstantHandle>, 
  +                                        scope.StartOffset, 
  +                                        scope.EndOffset - scope.StartOffset) |>ignore
  +
                   for localVariable in scope.Locals do
                       lastLocalVariableHandle <- metadata.AddLocalVariable(LocalVariableAttributes.None, localVariable.Index, metadata.GetOrAddString(localVariable.Name))
  -                scope.Children |> Array.iter (writePdbScope false)
  -
  -        writePdbScope true minfo.RootScope
  +
  +                scope.Children |> Array.iter (writePdbScope)
  +
  +        writePdbScope minfo.RootScope
           metadata.AddMethodDebugInformation(docHandle, sequencePointBlob) |> ignore)
   
       let entryPoint =
  
positive.code:             index.Add(doc.File, handle)
          index
  
      metadata.SetCapacity(TableIndex.MethodDebugInformation, info.Methods.Length)
      info.Methods |> Array.iteri (fun _i minfo ->
          let docHandle, sequencePointBlob =
  
negative.code:                     else
                          builder.WriteCompressedInteger(sps.[i].Offset)
  
                      let deltaLines = sps.[i].EndLine - sps.[i].Line
                      let deltaColumns = sps.[i].EndColumn - sps.[i].Column
                      builder.WriteCompressedInteger(deltaLines)
  
                      if deltaLines = 0 then 
                          builder.WriteCompressedInteger(deltaColumns)
  