Moving IMAP mail in Entourage 2008

I am modifying a script that has worked for a long time with a POP account to work with an IMAP account.

This key line fails…

move theMsg to folder "Child Folder" in folder "Parent Folder" of IMAP account acctName

ScriptDebugger gives me this error as I step over that line: Microsoft Entourage got an error: Can’t get incoming message id 82104.

How do I change that move line to work in an IMAP account?