tes_context: clear its state at destruction