Index work fine only when the HASH KEY is id.
In my opinion, indexes should not map obj.id but [HASH_KEY, RANGE_VALUE] and use it as an identifier for the row the index is added to. This will make it easy to retrieve the item from the original table this way.