Cleaned up Autoeditor._set_target_attribute().