Backport 7683 stable6