Please see the codes.
Code
<array name="inventory" />
<action name="action1">
set(array[inventory]['item_type'].value, get(item_index));
js(console.info(get(array[inventory]['item_type'].value);</action>
<action name="action2">
js(console.info(get(array[inventory]['item_type'].value);
</action>
action1 and action2 has different array[inventory][get(item_type)].value.
the original code is more complicated, but the concept is like the above.
Any idea?