what to do with deleted ebuilds

So today I wrote a little script to store the ebuilds and associated files of installed packages into a separate overlay as a first measure to solve bug #126059. It’s still far from perfect as it only adds to the overlay, isn’t limited to ebuilds deleted by an `emerge –sync` (which can be seen as a benefit as well) and most importantly doesn’t deal with Manifests yet.
The last point makes it rather useless for general usage, but it’s just a prototype script to see if this is a viable solution to the problem of disappearing ebuilds.
So any feedback about this would be appreciated.