Fixed #5807 (non virtual dtor in virtual class)