I see there are two types of shim for frames from different periods:
One's got an inny belly button and the other an outy. . . so it looks as though there's some protrusion that stops the shim from sliding out of the frame whether it's glued or not. Perhaps it'd be worth trying to install one without any glue at all.