Bug: 'Copy As AppleScript' generates unrunnable layer code

If we:

  1. Select All in a diagram with more than one editable layer, and then
  2. Edit > Copy As AppleScript

The AppleScript code which is generated contains bugs and does not compile or run.

The name: key for the layer objects is replace by the non-syntactic string (null).

For example:

tell make new layer at end of layers with properties {visible: true, (null): "Some layer name", prints: true}
-- ...
end tell