issue: Fix deleting an issue which has labels.

Deleting an issue which has one or more labels has caused database
integrity exception.