I would completely ignore him when he barks at objects - if you act upon his behaviour, you're reacting to it.

When you pick up a garbage bag and he barks, just carry on doing whatever you're doing with it.

Or try this:

Have a toy in one hand (one that he goes crazy over, or a treat!) when you go to pick up the garbage bag - when he starts barking, throw the toy/treat in the opposite direction and praise him when he grabs/eats it.