When registering token offsets, use setdefault.
Fixes setdefault bug.