This was an older post, but you have two options with those gears, either get a good one in your inventory and drop the bad ones on the ground and when you pick them up they'll stack with the good one, or put one good one in a chest and shift+click the others in (reverse of the problem you had...