Bug 833783: followup, fix exception when calling destroy multiple times.

Followup for PR #765 / bug 833783.