Very delayed response..... lol.
I created a process that identify the corrupt code so we can fix so it fell way down in my priority list. still manual.
Hilary, yes this occurs 100% within InfoPath code creation. We have still not been able to identify any pattern to this.