One more -fpermissive fix.
Fix possible undefined behaviour on deletion due to non-virtual destructor.