SDfat, cant restart sd card once removed

But still it's weird. Declaring two variables with the exact same name and in the same scope should have thrown a compiler error.
The previous (wrong) code shouldn't even upload.