Consistent typing of indexes