It looks like you are using an eVar, and I am willing to bet that eVar is set to Visit level expiry and not Hit level expiry..
if your eVar is not set on every hit, it will carry forward the last value it held and cause issue just like this.
A friend of mine likened eVars to "chewing gum on the sidewalk"... once you step on it, it sticks to your shoe and goes with you until something else dislodges it.
Check your eVar settings.. if you only want/need the eVar to have the value you specifically set to it, at the time it is set; then you must change the expiry to Hit to prevent this sort of corrupted result.