Fixes: #16836 (cherry picked from commit 4c4a018c) (cherry picked from commit 29cba5c9) (cherry picked from commit 7a301e73)