(a) I just build emacs from git.
Emacs version - "31.0.50" (on GNU - debian - on gce.)
(b) There, in the git version, I was reproduced the MRE I had presented, with and without -D.
(c) I applied Eli's fix, and re-eval'd the affected, function insert-directory-clean, per Eli's suggestion. Didn't re-build emacs. Instead, eval'd the new function. (Had killed the dired buffer before that, of course). Then, followed the MRE again. The bug still seems to persist(??)