"Failed Due to an Access Violation"

The dictionary entry for Script Debugger’s script handler’s “source text” says it’s settable, but the script below fails with the error:

“Error: set to failed due to an access violation (errAENotModifiable:-10003)”

tell application "Script Debugger"
	
	set targetDoc to document "some script with handlers" --		succeeds
	set aHandler to first script handler of targetDoc --				succeeds
	get source text of aHandler --								succeeds
	set source text of aHandler to "new stuff" --					fails
	
end tell

What am I doing wrong? I can set the source text of the document, but not of a handler.

Looks like a bug. I’ll have to check, but I suspect source text should be read-only for all classes other than document.

“It don’t do dat” is a valid answer. I can work with source text of document.