Inconsistent Syntax error using get database with uuid

I am trying to modify the folder action import script so that it imports to a specific database. For some reason - and for just one database - despite knowing the ID of the database - I cannot make this happen. It works for other databases.
So I have tried using the uuid of the database but this piece of script


set uuidDatabase to (get database with uuid "6080973A-E7BF-412A-B137-D5AC3C2C855A")

works fine by itself but does not work in the context of the folder action

on adding folder items to this_folder after receiving added_items
	try
		tell application id "com.devon-technologies.thinkpro2" to launch
		set uuidDatabase to (get database with uuid "6080973A-E7BF-412A-B137-D5AC3C2C855A")
		repeat with theItem in added_items
			try
				set thePath to theItem as text
				if thePath does not end with ".download:" then
					tell application id "com.devon-technologies.thinkpro2" to import thePath to incoming group of uuidDatabase
				end if
			end try
		end repeat
	end try
end adding folder items to

Anyone know why?

The error message is simply “Syntax Error Expected “given”, “into”, “with”, “without”, other parameter name, etc. but found “”".

Cheers
Steve

This works for me:

set thisUUID to "6080973A-E7BF-412A-B137-D5AC3C2C855A"
set uuidDatabase to (get database with thisUUID)