Fix #6316 If the size of memtable is greater than max segment size and the memtable will flush more than one segment file. BE coredump will be triggered when flushing memtable.