Backport 9738 stable6

Backport of #9738 to stable6