Mmmh… My code reaches the “end” of the “performSmartRule”-function.
theScriptHandler's globalLog("INFO", "Script finished", "script=" & quoted form of scriptName)
is run just before
end performSmartRule
I see this in the logs:

So, the method runs completely, but somehow DT thinks the Smart Rule is not finished.