Hmmm... I seem to be getting the same error with whatever error code file I use. The first time the build gives an error, any subsequent build will work (which is what the original poster was seeing as well). Does it work for you if you build a second time immediately after the error?
I tested out the functionality in LabVIEW 8.2 and it seemed to work fine, so this might be an issue with LabVIEW 8.5. I'll look into it further and report it to R&D if neccessary.