Fix modify empty section

recommended to review per commit.
there is no simple solution, only some kind of parser. Noone complain yet and we do not see any report even for SLE11 where is same code, so I do not want to modify it unless really needed.