Fixed the problem!
My original script did something like this ...
tell application "Mail"
try
set frontViewer to (some message viewer whose index is 1)
on error
error "A message viewer window must be open and frontmost in Mail."
end try
my setMailboxBehavior(frontViewer) -- verify and set common mailbox behaviors
set mailBoxList to (selected mailboxes of frontViewer) as list
It didn't cause a problem in Snow Leopard, but in Leopard, whenever setMailboxBehavior quit, then activated Mail, the value of frontViewer was no longer valid and caused the -609 error.
So, I changed the script to ...
my setMailboxBehavior() -- verify and set common mailbox behaviors
tell application "Mail"
try
set frontViewer to (some message viewer whose index is 1)
on error
error ("A message viewer window must be open and frontmost in Mail.")
end try
set mailBoxList to (selected mailboxes of frontViewer) as list
where the handler, setMailboxBehavior, now gets the value of frontViewer internally.
I just tested this in 10.5.8 and the -609 error no longer appears.