test_engine: fix a bug that may have caused execution of disabled actions