The bug is unlikely to lead to a real problem, so I installed the attached low-priority patch into the master branch rather than into emacs-27. Closing the bug report as fixed.