[core] ibdawg: add next node when drawing path of a word