Based on the insight offered in solution 1, the easiest fix would be inverting your for loop:
for (int x = i-1; x > 1; --x)
i *= x;
But, honestly, I would advise against using the input as a local, nodifiable variable. Solution 3 is much better in that regard: it doesn't modify i, and therefore doesn't run into the problem you had.
As a rule of thumb: do not modify function inputs, unless that is what the function is supposed to do. Declaring an extra variable only requires a trivial amount of typing, but it will save you a ton of time for not having to search for some obscure bugs like this one.
An even more general rule: the more verbose you are in writing your code, the harder it will get for bugs to hide. So don't shy away from long names or additional lines of code, if that makes your code easier to read and understand.