It's difficult to debug a sporadic problem when automatic diff refinement doesn't display refined overlays on some diff hunks occasionally. Looking at the code, it seems there is a possible race condition when diff--font-lock-refined calls diff-hunk-next that sets a timer that later might remove and try to re-add again overlays already added by the direct call of diff--refine-hunk from diff--font-lock-refined. Also diff-hunk-next prevents multiple consequent calls from refining a set of hunks by checking diff--auto-refine-data. To avoid such double refinement, this patch let-binds diff-auto-refine-mode to nil before calling diff-hunk-next for non-interactive navigation (it calls diff--refine-hunk explicitly below):