net-www/mozilla-1.4-r3. I think this happens with firebird too. ~/.mozilla/default/bookmarks.html keeps reverting to the original version. I now keep backing up a working version to ~/.mozilla/, ready for the next time it gets lost.
Sorry, this sounds like an upstream problem. I haven't seen this with the recent versions of mozilla or firefox.