fix Issue 6796 - Several __error with wrong enum definition