I am copying you on this thread too to help debug this.
(defun verilog-highlight-region (beg end _old-len)
"Colorize included files and modules in the (changed?) region.
Clicking on the middle-mouse button loads them in a buffer (as in dired)."
(when (or verilog-highlight-includes
verilog-highlight-modules)
(save-excursion
(save-match-data ; A query-replace may call this function - do not disturb
(verilog-save-buffer-state
(verilog-save-scan-cache
(let (end-point)
(goto-char end)
(setq end-point (point-at-eol))
(goto-char beg)
(beginning-of-line) ; scan entire line
;; delete overlays existing on this line
(let ((overlays (overlays-in (point) end-point)))
(while overlays
(if (and
(overlay-get (car overlays) 'detachable)
(or (overlay-get (car overlays) 'verilog-include-file)
(overlay-get (car overlays) 'verilog-inst-module)))
(delete-overlay (car overlays)))
(setq overlays (cdr overlays))))
;;
;; make new include overlays
(when verilog-highlight-includes
(while (search-forward-regexp verilog-include-file-regexp end-point t)
(goto-char (match-beginning 1))
(let ((ov (make-overlay (match-beginning 1) (match-end 1))))
(overlay-put ov 'start-closed 't)
(overlay-put ov 'end-closed 't)
(overlay-put ov 'evaporate 't)
(overlay-put ov 'verilog-include-file 't)
(overlay-put ov 'mouse-face 'highlight)
(overlay-put ov 'local-map verilog-mode-mouse-map))))
;;
;; make new module overlays
(goto-char beg)
;; This scanner is syntax-fragile, so don't get bent
(when verilog-highlight-modules
(condition-case nil
(while (verilog-re-search-forward-quick "\\(/\\*AUTOINST\\*/\\|\\.\\*\\)" end-point t)
(save-excursion
(goto-char (match-beginning 0))
(unless (verilog-inside-comment-or-string-p)
(verilog-read-inst-module-matcher) ; sets match 0
(let* ((ov (make-overlay (match-beginning 0) (match-end 0))))
(overlay-put ov 'start-closed 't)
(overlay-put ov 'end-closed 't)
(overlay-put ov 'evaporate 't)
(overlay-put ov 'verilog-inst-module 't)
(overlay-put ov 'mouse-face 'highlight)
(overlay-put ov 'local-map verilog-mode-mouse-map)))))
(error nil)))
;;
;; Future highlights:
;; variables - make an Occur buffer of where referenced
;; pins - make an Occur buffer of the sig in the declaration module
)))))))
I do not understand overlays very well, but it looks like verilog-mode or some minor mode created 5 overlays over the same region, and they did not get removed even when those modes were disabled.
Some more info.. with each revert-buffer call, that overlay is replicating over the same region.. I reverted the buffer 4-5 times and now in the C-u C-x = generated Help buffer, I see..
From 1466 to 1482
end-closed t
evaporate t
local-map [Show]
mouse-face highlight
start-closed t
verilog-include-file t
From 1466 to 1482
end-closed t
evaporate t
local-map [Show]
mouse-face highlight
start-closed t
verilog-include-file t
...
(and so on 27 times!)