Revert "Revert "Merge pull request #15857 from comoyo/bug964216""

This reverts commit 33eb812eadb61f76744103105e099972a8255843.