Bug 981938 - Part 2: Don't rely on the value stored under INDEX_ID. (It ...

...might be out of date.) Fetch the keys with getAllKeys() instead. r=arthurcc