Also here is my version of Thi's patch to buffer.c. I had to avoid calling Foverlay_put from Fmake_overlay as it caused (make-overlay 1 1) to immediately evaporate. The only other change was to print more information about the overlay so it was easier to track down.