Better error message.
Fix test case that produced an invalid plan.