Move camera depth of field from background to magnifier on the foreground
This is actually as expected - the 'image' through the magnifying will not be focussed at the distance of the magnifying glass but will actually be focussed at a distance dependent on the distance to the magnifying glass and the focal length of the lens - and this wont correspond with the actual distance of the distant object.

Since the focal distance of the image doesn't correspond to any "physical" object in the scene you will need to manually adjust the Depth of Field distance to find the required focal depth - simply adjust it until you get a sharp image. Note that you may need to adjust it well beyond the distance to the object, making the magnifying glass itself even more out of focus!