Fix typo in error message (Trac #6076)