lib: fix ast id handling
0.3.4