Fix self-update error handling, fixes #1738