Just in case it helps, here's what the lines in question look like after modification:
Code:
if my onlyShowOmniPlanFilesInOpenDialog then
set sourceAlias to choose file with prompt "Source project to import contents from:" of type {"com.omnigroup.omniplan.planfile"} without invisibles
else
set sourceAlias to choose folder with prompt "Source project to import contents from:" without invisibles
end if
repeat with thisFile in (items of sourceInfo whose kind is "OmniPlan")
-- sneaky trick to prevent quirks that occur when two OmniPlan files have the same uuid. Generate a new file using the original as a template will force a new unique id.
set thisFile to info for sourceAlias
if kind of thisFile is "OmniPlan" then
set t to POSIX path of sourceAlias
set sourceDoc to make new document with properties {template:t}
set sourceName to name of thisFile
... and I ended the repeat before the end tell on the last line of the script.
Thanks for all the help.