[1.7.x] Tests for #22325