Fixes: #18599 (cherry picked from commit feac9a1d) (cherry picked from commit 1600b38c) (cherry picked from commit 7f143dad)