[core][js] gc engine: fix disambiguator bugs