TS-3224: fix problem of ts_lua coredump