fix Issue 9386 - struct destructor called erroneously
Merge pull request #1875 from 9rnsr/fix9386

Issue 9386 - struct destructor called erroneously