Attempt to fix crash when deleting StatBlock

Fixes #1176