Fix bug in index table creation when underlying table has a range key.