Fixes: #16685 (cherry picked from commit 5d1e68b4) (cherry picked from commit 6cd058f3) (cherry picked from commit 590b9f58) (cherry picked from commit 677fb2b6)