fix #23341

In the hope to not have screwed up things beyond repair, as due to lack of a build environment I haven't compiled and tried it myself