What the #*! is Photoshop doing after it finishes running this script?

I’ve got this applescript that copies a layer set. Real short and simple.

tell application "Adobe Photoshop CS6"
	activate
	tell the current document
		duplicate (layer set "Goods Image" of layer set "Script Items") to before layer set "Header Elements" with properties {name:"G200"}
	end tell
end tell

Running it from Script Debugger, Photoshop successfully performs the specified action and reports back to Script Degbugger that it’s done in 3.4 seconds.

Then Photoshop goes crazy for about two minutes.

The cursor constantly flashes between crosshairs and an arrow, any user actions happen with a huge delay, it’s basically unusable for about two minutes. Then it just clears up and it’s fine again.

This is Photoshop CS6. The layer set I’m moving only has two sublayer sets, each of which has one blank text field, so there’s very little there.

This is really annoying. The action is not useful if it makes Photoshop unusable for two minutes, it can be done manually faster including the “Go Crazy” time.

Any thoughts?

OK, I should have dug around more. Photoshop only freaks out after the script is run when the script is run from Script Debugger, NOT when it’s run from Applescript Editor. Since it won’t be run from Script Debugger in production, it’s not a problem. Still annoying when working on the script, but not a problem.