       (unless (equal leftovers "")
         (message "F* subprocess died early: %s" leftovers)))
     (kill-buffer))
-  (fstar-subp-remove-issue-overlays (point-min) (point-max))
-  (fstar-subp-remove-tracking-overlays)
-  (fstar-subp--clear-continuations)
-  (setq fstar--vernum nil
-        fstar--features nil
-        fstar-subp--process nil
-        fstar-subp--queue-timer nil
-        fstar-subp--next-query-id 0))
+  (fstar--widened
+    (fstar-subp-remove-issue-overlays (point-min) (point-max))
+    (fstar-subp-remove-tracking-overlays)
+    (fstar-subp--clear-continuations)
+    (setq fstar--vernum nil
+          fstar--features nil
+          fstar-subp--process nil
+          fstar-subp--queue-timer nil
+          fstar-subp--next-query-id 0)))
 
 (defun fstar-subp-kill ()
   "Kill F* subprocess and clean up current buffer."

(defun fstar-subp-retract-last ()
  "Retract last processed block."
  (interactive)
  (fstar-subp-retract-one (car (last (fstar-subp-tracking-overlays))))
  (fstar-subp-goto-beginning-of-untracked-region))

(defun fstar-subp-retract-until (pos)
  "Retract blocks until POS is in untracked region."
  (cl-loop for overlay in (reverse (fstar-subp-tracking-overlays))
           when (> (overlay-end overlay) pos) ;; End point is not inclusive
           do (fstar-subp-retract-one overlay)))

(defun fstar-subp-advance-until (pos)
  "Submit or retract blocks to/from prover until POS (included)."
  (fstar-subp-start)
  (save-excursion
    (let ((found nil))
      (fstar-subp--untracked-beginning)
      (while (and (<= (point) pos) (fstar-subp--next-point-to-process))


(defun fstar--syntax-ppss (pos)
  "Like `syntax-ppss' at POS, but don't move point."
  (when (buffer-narrowed-p)
    (warn "`syntax-ppss' called in narrowed buffer.
Please submit the following stack-trace to the fstar-mode bug tracker:
%s" (with-output-to-string (backtrace))))
  (save-excursion (syntax-ppss pos)))

(defun fstar-in-comment-p (&optional pos)
