Fixes: #16685 (cherry picked from commit 5d1e68b4)
mentioned in commit 87852706
mentioned in commit 677fb2b6