Fix query processing for pure index queries in dynamodb