Cleaned up Editor._set_target_attribute().

Replaced an unused branch with new().