Hi,
If you can place a copy of your broken .cfg somewhere, Pastebin, DropBox, etc, I'd be happy to run a diff against versions I have to see if I can find where the problem is.
I think, from looking at the forked github repo for EmulationStation used by RetroPie, and the original parent project, that es_systems.cfg is generated by code - I was hoping there was a full copy of the file in the repo which you could retrieve for any given version of RetroPie.
[edit}
As suspected, the es_systems.cfg is generated when the system is being set up
From the README.md file in the parent project:
"When first run, an example systems configuration file will be created at ~/.emulationstation/es_systems.cfg. ~ is $HOME on Linux, and %HOMEPATH% on Windows. "