I got extremely bad quality when editing and saving JPEGs, and apparently didn't it only not initialize the quality when saving it also stored random garbage values in the config files, so they were preserved forever.
So fetch the current value from config initially, and fetch it again when calling save as, in case it changed. Still a bit broken, it won't be reloaded if just saving and it is changed elsewhere, but this is the minimal change that seems to fix the current implementation.