add boundary check for tkidmap_fast array