The issue is, as stated by Christoph the assumption that ~/.config/autostart exists. In case it does not, the copy operation for the .desktop file fails and the error condition is not cleared after that. Thus, when removing and re-enabling autostart, there is already an error condition in memory and GError is not allowed to be overwritten.
Same issue is reproducible in openSUSE package.
The issue is, as stated by Christoph the assumption that ~/.config/autostart exists. In case it does not, the copy operation for the .desktop file fails and the error condition is not cleared after that. Thus, when removing and re-enabling autostart, there is already an error condition in memory and GError is not allowed to be overwritten.