ID-based index. Fixes #30