Add tests for the new indexing semantics