liveroy's advice is great. I've followed it with success, although the screen I bought has the dreaded phantom touch issue (cheap ebay job!) and will have to go back (this issue was apparent even before I glued it to the mid-frame).
Firstly I separated the screen from the mid-frame with two small suction cups, designed for removing halogen light bulbs, on the top and bottom of the glass. This worked well, but I had to use very gentle tugs to ensure I didn't tear the ribbon cable. Because the double-sided tape used was already separating, this was quite an easy part of the job.
I used
Araldite 2-Tubes Standard Epoxy, because it has a very long cure time, which allowed me to work slowly. With the screen and mid-frame completely separate and cleaned up, I then threaded the screen's ribbon cable through the hole before glueing. The trickiest bit was putting the epoxy along the frame where the ribbon cable is; to do this I just wedged some folded paper between frame and screen while I layed down the epoxy. I guess I could have just done this bit first and avoided the need for a paper wedge (this was used to prevent prematurely sticking the screen to the frame before all the epoxy's down).
I used the screen's plastic film to protect the screen from the epoxy, and cleaned the excess epoxy with an old bottle of disk head cleaner I found lying about (smelt very alcoholly!) and cotton buds. I used some clothes pegs to clamp the screen to the frame, but I took them off after a few hours. Then I left it for a couple of days. The result was as good as I could have hoped for. I can see a little bit of the dried epoxy in the very narrow trenches between the mid-frame and glass, but this doesn't bother me. Way better than having light streaming through the sides, and it seems like a really solid grip! When in use and getting warm I could still see a bit of lift at the sides, but because it was glued there was absolutely no gap.
Going back to the original need for this fix -
On my phone I believe this is due to a warped, concave logic board, effectively peeling the glass away from the mid-frame when fitted. If it were totally flat then I doubt this would happen. I guess the aftermarket screen manufacturers didn't factor this in when they decided to use "weak" double-sided tape. I've also noticed that, with the new screen in place, the outer back shell of the phone, that you put on last, doesn't quite fit at the bottom like with the old screen - there is now a small a gap where the inner plastic housing is exposed. I think this is because the new mid-frame is straighter than the old, and the old shell has itself bent over time.