Fix confusing error message.

When validating a task prior to marking as closed or deleted, a
validation error scenario would present a fairly confusing error
message.