// otherwise update the worldStamp
int startLevel = worldStartLevels[environment.getWorldIndex()];
int prevWorld = environment.getWorldIndex() - 1;
int writeIdx = startLevel;
for (int level = startLevel; level < currentLevel; level++) {
StoredIntVector var = vectorStack[level];
int idx = indexStack[level];
int val = valueStack[level];
int stamp = stampStack[level];
var.worldStamps[idx] = prevWorld;// update the stamp of the variable (current stamp refers to a world that no longer exists)
if (stamp != prevWorld) {