Fix bug 1049: Raise exception if model does not exist when destroying a model