reduce/remove getitem side effects, tests for #297
get rid of side effects in the interpreter if trying to use the index on an iterable (using __getitem__)