Backport #34495 by @ChristopherHX * the origin of this problem is duplicated code Co-authored-by: ChristopherHX <christopher.homberger@web.de>