Fixed crash when undoing command-copying entities in screen editor