Fixes: #19258 (cherry picked from commit cbb6c000)
mentioned in commit 3acf1d97
mentioned in commit 270716d9