Keep last non-null context for set_current_engine.