Fixes wrong check in IdStore.
Fixes fox encoder did not use IdStore for every lookup.