Just an FYI for people. I have found an apparent bug in StormLib v8.02 (and I presume it exists in some earlier versions as well). The bug is that SFileHasFile() will sometimes incorrectly return false. I believe this happens when the file you're checking for did not exist in the parent MPQ, but was created by a patch (in other words, SFileHasFile() does not appear to use "merged mode" when checking for a file's existence).
I have reported this to the stormlib author, but for now I would recommend not using SFileHasFile().