You're talking "lids and sides of grain bin", so that means the grain is already out of the bags and into the bin.
It is always possible the bugs were hatching inside the bin before you dumped the grain
Hopefully you still have the bags, dig them out of the garbage and look not only for bugs inside the bag but for an expiration date.
There will most likely be bugs in the empty bag if they originated in the bags.
Sadly, if any sort of horse feed sits around long enough (even rice bran) bugs are going to hatch and sometimes they hatch in large numbers.
If you do consistent busines with the store you bought the grain from, I would take it back in New York City Minute. Others will disagree and say horses eat stuff like that all the time. True but, I'm not intentionally handing my horses a scoop full of grain with bugs crawling in it.
The other thing you can do, if taking the feed back is impossible, is to buy a mesh food strainer.
Put a couple cups of feed at a time into the strainer while it's sitting over wax paper, newspaper, anything you can throw out.
If the bugs are smaller than the feed, they will drop thru the mesh of the strainer and your feed should stay inside the strainer for the most part.
Lesson-learned is don't trust the feed dealer - check the expiration date on the bags before you buy them. Even if it's close to expiring but hasn't yet? Horse feed is generally "fresh" for six months to a year before the expiration; an almost ready to expire date means they have had the feed sitting around for at least 6 months to a year.
I learned all that the hard way and by calling the company who's feed it happened to be, instead of the feed store
Another good example of stores keeping outdated products on the shelf:
I recently had a store try to sell me the pre-probitioc Succeed at half price (half was $45) because it was dated April, 2011
At least he didn't lie over the phone.
I called the company. They said being that far out-dated would not hurt my horse at all BUT the product's efficacy had weakened. Since my horse has already colicked four times and has hind gut ulcers, I chose to order fresh Succeed at $90 for a month's supply.
Point-being, I am saying No, No, and NO
, don't feed that bug-infested stuff to your horses; if you can't take it back and can't afford to dump it, the strainer might work.