Script compatibility under Snow Leopard: bug?

Hi,
after some days and a lot of tests on both Leopard and Snow Leopard, finally we have isolated the problem. We suppose that the problem is caused by AppleScript when running under Snow Leopard. But we can’t be 100% sure.

We post here below the AS script, made by Script Editor (that is the smallest version of our real ASS application).
It gets information from each message in the Entourage database. It has been successfully tested a lot of times under Leopard with many different identities containing thousands of emails. It did run perfectly.
No problem at all. Instead, running on Snow Leopard, the same AS script simply causes Entourage to go to timeout, generating the -1712 error.
We tried both the 32 and 64 bit versions of our script on Snow Leopard. Same bad result. A few times it works, some other times it goes to timeout.
All the tests have been executed on different “clean” Macs (iMac, Mac Pro, Mac Book Pro) with Snow Leopard 10.6.1 and Entourage 2008 12.2.1. We heard that some others users have had troubles about timeout after running their scripts/apps on Snow Leopard.

Please, can somebody tell us whether this trouble is caused by an AppleScript’s bug when running on Snow Leopard? Or can the trouble related to the AppleScript scriptability of 3rd parts applications (Entourage, Photoshop…) that are not fully compatible with Snow Leopard?
Any answer or feedback would be greatly welcome. Thank you.

Please find here below the AS script we used on our tests:

property pEntourageStructure : missing value

tell application “Microsoft Entourage”
set folderList to (ID of every folder) as list
end tell

set pEntourageStructure to {}
set numFolders to count folderList
repeat with j from 1 to numFolders
set entourageFolderID to item j of folderList
StructureRecursive(entourageFolderID)
end repeat

set numFolders to count pEntourageStructure

set t1 to current date

repeat with j from 1 to numFolders
set folderID to item 2 of item j of pEntourageStructure

tell application "Microsoft Entourage"
	set pFolderMessages to count messages in folder id folderID
end tell

repeat with m from 1 to pFolderMessages
	tell application "Microsoft Entourage"
		
		tell message m of folder id folderID
			set emailID to ID
		end tell
		
		-- Capture Categories
		set categoryList to category of message id emailID
		
		-- Capture Dates and Class
		tell message id emailID
			set emailSentDate to time sent
			set emailReceivedDate to time received
			set numAttachments to count attachments
			
			if class is incoming message then
				set emailClass to "incoming message" as string
			else if class is outgoing message then
				set emailClass to "outgoing message" as string
			end if
			
			-- Capture Sender
			set displayName to (display name of sender) as Unicode text
			set displayEmail to address of sender
			
			-- Capture Subject and Body
			set subjectRecipient to subject
			set contentRecipient to content
			
		end tell
	end tell
end repeat

end repeat

set t2 to current date
set t3 to t2 - t1

on StructureRecursive(myObject)
tell application “Microsoft Entourage”
set folderName to name of folder id myObject
set numItem to count folders in folder id myObject
end tell

copy {folderName, myObject} to end of pEntourageStructure

if numItem > 0 then
	tell application "Microsoft Entourage"
		set folderList to (ID of every folder in folder id myObject) as list
	end tell
	repeat with i from 1 to numItem
		set idObject to item i of folderList
		StructureRecursive(idObject)
	end repeat
end if

end StructureRecursive