Yes, I think GIMP does this correctly. At least in photographic terms. You never want to edit your original JPEG, that is why you shouldn’t be able to open a photo and save directly over top of it.
Anyway, I understand that others disagree with this approach.