Fix query on local secondary indexes to properly sort items based on index key