diff --git a/Compiler/types.py b/Compiler/types.py index 0104f7b0c..263aac90a 100644 --- a/Compiler/types.py +++ b/Compiler/types.py @@ -6492,7 +6492,8 @@ def __getitem__(self, index): return self.get_vector() if isinstance(index, int) and index < 0: index += self.sizes[0] - key = program.curr_block, str(index) + key = program.curr_tape, tuple( + (x, x.has_else) for x in program.curr_tape.if_states), str(index) if key not in self.sub_cache: if util.is_constant(index) and \ (index >= self.sizes[0] or index < 0):