These things are a fact of life in our house. DH took our larder cupboard apart once and found they were all living in the chipboard shelves - the side edges of the shelves aren't sealed like the front and back, so he took all the shelves in the garage, emptied a whole can of fly spray into all edges, then the next day, after cleaning them, he painted the edges with gloss paint to seal them. I always keep all my packs of dried goods in either kliplock bags or strong polythene bags with freezer bag clips, which keeps everything bug free. But I find them in my books too. And I'm not going to put them in polythene bags 
I did keep flour in tupperware at one time, but I still found weevils in there. The fact is, the eggs are in the flour when it's bought and the only way to stop the bugs is to keep flour in the freezer for a few days. This only kills the eggs and stops them hatching, though - the eggs are still in the flour 