How does Lorentz transforming forwards, then backwards, stay consistent? Let me take you through the logic in my head...

*

*In frame S, you have coordinate $x$

*Transform to frame S' with velocity $v$ so the coordinate is now $x' = \gamma x$

*Now treat the S' frame as if you started there.

*Transform to a frame S'' moving at velocity $-v$. The coordinate is now $x'' = \gamma x'$

*However, S'' and S are the same frame so $x'' = x$

*So $x = \gamma x' = \gamma ^2 x$
I would like to clarify, I'm using t=0 for everything here
How does this make sense, what am I missing?
 A: The Lorentz transformation always transfoms not only coordinates but also time. In fact you can consider it as a sort of a "rotation" in $(t,x)$ "plane".
Whe you start with an event $(0,x)$ in the new frame it will have $t'=-\gamma \frac{v}{c^2} x$, $x'=\gamma x$. You see that even though all events $(0,x)$ are simultaneous in the initial frame, in the new frame they have different $t'$. This is known as a relativity of simultaneity and in my experience most "paradoxes" in special relativity originate from people forgetting about this fact.
Now if you apply the reverse Lorentz transformation you have
$$x''=\gamma x'+\gamma v t'=\gamma^2(1-\frac{v^2}{c^2})x=x$$
Similarly you will get $t''=0$
A: The first answer gives you insight into simultaneity. Although $t'\neq 0$ everywhere in $S'$ (except for $x'=x=0$), this is not the root of the problem. Even if you take $t'\neq 0$ the paradox arises. The real problem is that you can't find, in general, the correct transformation between $S$ and $S''$ by reference to an intermediate frame $S'$ (so you can't say that $x''=\gamma (x'-vt')$). You'll get trouble indeed:
In $S'$ (for $t=0$):
$$x'=\gamma x$$
$$t'=-\gamma \frac{vx}{c^2}$$
Now assume for $x''$ ($\gamma$ is the same as in the two transformations above because $S''$ moves relative to $S'$ with speed $v$):
$$x''=\gamma (x'-vt')$$
Filling in the expressions for $x'$ and $t'$ gives:
$$x''=\gamma(\gamma x+\gamma\frac{v^2}{c^2}x),$$
so
$$x''={\gamma}^2x(1+\frac{v^2}{c^2})=\frac{1+\frac{v^2}{c^2}}{1-\frac{v^2}{c^2}}x,$$
which, if $x''=x$, would give:
$$x={\gamma}^2x(1+\frac{v^2}{c^2})=\frac{1+\frac{v^2}{c^2}}{1-\frac{v^2}{c^2}}x,$$
which is obviously nonsense (when $v=0$ the equality holds but the problem is that you have set $v=v$). So the assumption that $x''=\gamma (x'-vt')$ (as you suggest) is just wrong. You can set $x''=\gamma x'+\gamma v t'$ though, which in combination with the inverse Lorentz transformation $x=\gamma x'+\gamma v t'$ gives you $x''=x$.
This problem can only be resolved by stating the correct (and direct) transformation (for $x$) between $S''$ and $S$:
$$x''=\gamma'(x-v't),$$
where $v'$ is the relative velocity between $S$ and $S''$ (which is not the same as the sum of the relative velocities $S-S'$ and $S'-S''$, in accordance with the addition rule of velocities $v'=\frac{v+v}{1+\frac{v^2}{c^2}}$) and $\gamma'$ the with $v'$ associated Lorentz factor. This indeed gives $x=x''$ if $S''$ doesn't move relative to $S$ and, if you set $x''=x$, you get no nonsensical result but instead, you get the sensical result that $v'=0$). You can't find this transformation in the way described above.
So, to answer your question in short, you can't set $x''=\gamma x'$ (or $x''=\gamma (x'-vt')$) in the first place. When you do so you arrive at the wrong result $x''={\gamma}^2 x$ or $x''={\gamma}^2x(1+\frac{v^2}{c^2})=\frac{1+\frac{v^2}{c^2}}{1-\frac{v^2}{c^2}}x$. So it's your fourth "bullet" that deserves attention. Only in the special case that the velocity of $S''$ is $-v$ you can write $x''=\gamma (x'-vt')=\gamma (x'+vt')$ (giving $x''=x$). If the velocity of $S''$ were $v$ you couldn't write $x''=\gamma (x'-vt')$ though. So much ado about a minus sign...(with thanks to @J.Murray).
