[1.7.x] Fixed a test failure introduced by 214d1e1b0f.

Backport of 9bc377d7d0 from master