anchor.diff:          let closingSnapshotPoint = closingPoint.GetPoint(subjectBuffer.CurrentSnapshot)
   
           if closingSnapshotPoint.Position > 0 then
  -            let caretPos = getCaretPosition this
  -
  -            if caretPos.HasValue && not (this.HasNoForwardTyping(caretPos.Value, closingSnapshotPoint.Subtract(1))) then
  -                true
  -            else
  -                false
  +            match tryGetCaretPosition this with
  +            | Some caretPos when not (this.HasNoForwardTyping(caretPos, closingSnapshotPoint.Subtract(1))) -> true
  +            | _ -> false
           else
               false
   
  
positive.code:     interface IBraceCompletionSessionProvider with
  
          member __.TryCreateSession(textView, openingPoint, openingBrace, closingBrace, session) =
              let textSnapshot = openingPoint.Snapshot
  
              let newSession =
                  match textSnapshot.GetOpenDocumentInCurrentContextWithChanges() with
                  | null -> null
                  | document ->
                      match getLanguageService<IEditorBraceCompletionSessionFactory> document with
                      | null -> null
                      | editorSessionFactory ->
                          // Brace completion is (currently) not cancellable.
                          let cancellationToken = CancellationToken.None
                          
                          match editorSessionFactory.TryCreateSession(document, openingPoint.Position, openingBrace, cancellationToken) with
                          | null -> null
                          | editorSession ->
                              let undoHistory = undoManager.GetTextBufferUndoManager(textView.TextBuffer).TextBufferUndoHistory
                              BraceCompletionSession(
                                  textView,
                                  openingPoint.Snapshot.TextBuffer,
                                  openingPoint, 
                                  openingBrace, 
                                  closingBrace, 
                                  undoHistory, 
                                  editorOperationsFactoryService, 
                                  editorSession) :> IBraceCompletionSession
  
              session <- newSession
  
              match session with
              | null -> false
  
negative.code: [<AutoOpen>]
  module BraceCompletionSessionProviderHelpers =
  
      let tryGetLanguageService<'T when 'T :> ILanguageService and 'T : null> (document: Document) =
          match document.Project with
          | null -> None
          | project ->
              match project.LanguageServices with
              | null -> None
              | languageServices ->
                  languageServices.GetService<'T>()
                  |> Some
  
      let tryGetCaretPoint (buffer: ITextBuffer) (session: IBraceCompletionSession) =
          let point = session.TextView.Caret.Position.Point.GetPoint(buffer, PositionAffinity.Predecessor)
          if point.HasValue then Some point.Value
          else None
  
      let tryGetCaretPosition session =
          session |> tryGetCaretPoint session.SubjectBuffer
  
      let tryInsertAdditionalBracePair (session: IBraceCompletionSession) openingChar closingChar =
          let sourceCode = session.TextView.TextSnapshot
  