I'd ask @Rim to confirm that the code confirms that new condensed file(s) have been created successfully before any old files are deleted/moved. Does iOS even allow for such checks? Perhaps the deleting of old files should remain a separate user-confirmed step ('Menu -> Settings -> General(tab) -> Clean Up Project')?
I also note references to the affected projects containing markers. Has that been eliminated as a factor too?
BTW, I'm fortunate in that I've never been bitten by this particular issue (fingers crossed