Slight modification to bug #8078.  It now sets an error message.