                                  :test #'file-equal-p))
                (push (elisp/ert/load--instrument fullname file) load-buffers)
                t))))
-        ;; Check for duplicate names, if possible.  Duplicates cause subtle
-        ;; errors that are otherwise very hard to debug,
-        ;; cf. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41853.
-        (when (boundp 'edebug-new-definition-function)  ; new in Emacs 27
-          (add-function
-           :before edebug-new-definition-function
-           (lambda (name)
-             (when (memq name instrumented-names)
-               (error "Symbol ‘%s’ instrumented twice" name))
-             (push name instrumented-names))))
         (when (version< emacs-version "28.1")
           ;; Work around https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41989 and
           ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41988 by uniquifying

            ;; The coverage manifest uses ISO-8859-1, see
            ;; https://github.com/bazelbuild/bazel/blob/3.1.0/src/main/java/com/google/devtools/build/lib/analysis/test/InstrumentedFileManifestAction.java#L68.
            (coding-system-for-read 'iso-8859-1-unix)
            (instrumented-files ())
            (instrumented-names ()))
        (with-temp-buffer
          (insert-file-contents (concat "/:" coverage-manifest))
          (while (not (eobp))

        (load-file-name fullname)
        (set-auto-coding-for-load t)
        (inhibit-file-name-operation nil)
        (edebug-all-defs t)
        (edebug-new-definition-function #'elisp/ert/new--definition)
        (edebug-after-instrumentation-function
         #'elisp/ert/after--instrumentation))
    (with-current-buffer buffer
      (insert-file-contents fullname :visit)
      ;; The file buffer needs to be current for Edebug
