I think this is a well known fact that reflashing the firmware wipes out the coding changes. The coding is not software programs running on an OS. They are OS settings. So if you wipe the OS and replace it, the coding goes away. There is no way to repair the firmware, only to replace it.
This is why if you are coding, you should either do it yourself and keep a log, or if you pay someone else to code, see if you can get a lifetime coding arrangement for the duration you own the car.
2014 Porsche 911 Turbo S
2015 Mercedes C300 4MATIC