There is another thread on this forum reporting a similar environment-dependant issue with the same error message:
http://www.infopathdev.com/forums/t/3856.aspx
and an oh-so-helpful (not) Experts Exchange item as well
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Q_23135195.html
You might want to try the technique in the top link, but I wouldn't recommend it, as it looks like a bit of a hack. It would be better to figure out which code is causing the problem and try to fix it. Does your form have an OnLoad event that is running code? That might be where the problem is taking place.