fix: keep track of the input index better for subscript hashing.