backport efeb039 from #11201 fixes #11540 [ci skip]
Merge pull request #11562 from zzak/backport_efeb039

backport efeb039 from #11201 fixes #11540 [ci skip]