sed -i destroy symlink - how to solve this ?

After a few hours of frustration because I didn't understand why my symlinks are destroyed i just found out that sed -i will destroy symlinks.
I searched but i didn't found any good solution for this.

Is there any way to overcome this ? On my ubuntu server sed version is 4.1.5

edit: Sorry for this topic, an obvious solution will be to update to sed 4.2 and user --follow-simlinks