MDL-31501 attempt to workaround fatal errors in DB destructor