[core] gc engine: fix bug for multi-token detection