helper/command: make command_run_line reentrant