 (defun merlin--type-enclosing-after ()
   (when (and (fboundp 'set-temporary-overlay-map)
              merlin-arrow-keys-type-enclosing)
-    (set-temporary-overlay-map merlin-type-enclosing-map t)))
+    (set-temporary-overlay-map merlin-type-enclosing-map t
+                               'merlin--type-enclosing-reset)))
 
 (defun merlin-type-enclosing ()
   "Print the type of the expression under point (or of the region, if it exists)."

      (indent-region start (point)))))

(defun merlin--destruct-enclosing ()
  (let* ((bounds (cdr (elt merlin-enclosing-types merlin-enclosing-offset)))
	 (start  (merlin-unmake-point (car bounds)))
	 (stop   (merlin-unmake-point (cdr bounds)))

  (let ((keymap (make-sparse-keymap)))
    (define-key keymap (kbd "C-<up>") 'merlin-type-enclosing-go-up)
    (define-key keymap (kbd "C-<down>") 'merlin-type-enclosing-go-down)
    (define-key keymap (kbd "C-d") 'merlin--destruct-enclosing)
    (define-key keymap (kbd "C-w") #'(lambda ()
                                     (interactive)
                                     (let ((data (elt merlin-enclosing-types merlin-enclosing-offset)))
