I have read several posts on this topic like http://social.technet.microsoft.com/Forums/en-US/mdt/thread/36ed037b-51b1-4053-a248-46bd3ac9ecda where the Dirty Environment Found message appears, but the circumstances are a bit different in my case.
I have a new MDT 2012 Update 1 task sequence with a newly captured Windows 7 SP1 x86 image captured with MDT 2012 Update 1.
If I run the task sequence with no HIDESHELL specified in CustomSettings.ini, it runs to completion with no issues. If I set HIDESHELL=YES in CustomSettings.ini, then the StateRestore phase starts with booting to Windows 7, auto-logging in and then the task sequence continues. At the same time, I get the Dirty Environment Found message and if I leave it alone, the task sequences completes with no errors, just with the Dirty Environment FOund message on top.
This only happens when HIDESHELL=YES is specified in CustomSettings.ini.