Something changes when you put the top on -- the top pushes a wire or something out of place. Peer at it as you put the top on, peering in the crack just before it disappears and you can't see any more -- you can probably see what's being disturbed. Then you can move that thing a little, probably pushing it with your screwdriver, trying different positions for it until you find one that lets the light work but that wire or whatever that thing is won't be moved when you put the top on.
This kind of thing is a lot easier to do than to explain! Incoherent as it is I think I've explained the principle the best I can -- now you just have to apply it, fiddle with the thing until it works. If you can't see what's being moved by the top, guess -- just keep guessing and pushing wires and things around in there and trying it until you get it.
-Cougar Allen :{)