The problem lies in the WiFly library. It expects everything to be transmitted correctly without any bit error. If there's one single bit transmitted wrongly it will hang endlessly. I used an RN-XV (which is from the same family) with an older version of the library and had similar problems. I patched it to my needs and inserted timeouts for every loop that else may be endless. After that patch my sketch worked reliably.
Your software reset doesn't work because the Arduino will not get there if it really hangs in an endless loop inside the library.
The only strange thing in your case is that it works reliably if connected to the computer. Sounds a bit like the power supply inserts some electrical noise to the system.