Backport #28225 by @denyskon Inspired by #28182 Co-authored-by: Denys Konovalov <kontakt@denyskon.de>