Split 'flush_old_exec' into two functions