which assigns a specific numeric value to i . Then, a few lines later, you have
which overwrites i with a symbolic value, equivalent to doing
So now i is symbolic with no value other than itself, and has completely lost track of the fact it had previously been assigned 13.
Then later in your code you assume that i is still 13.