fa8a9843b1
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17429
(manually cherry picked from commit 0598ca0f90)