Fixes: #22060 (cherry picked from commit f699bd81)
mentioned in commit 9ee300a0
mentioned in commit 5f9a81e0