for now, fix segv when encoding repeated field