Fix typo in similar error message

Backport of 2a35df6
for #8620