Blue garlic during pickling
Yes, I also got pickled garlic that got blue after I got it from market. What I always do is as soon  as I get them from a market,  I insert few cloves in it for a short duration of time because I don't want the flavour of cloves and blanching it does help. The heat in blanching will destroy the pigments for coloration. 

How to blanch:
- Dip garlic in cold water
- Heat it 
- Repeat again and again (Preferably 4 times)

The blue color is mainly due to the enzyme (sulphur and amino acids) and is harmless. 

Hope this helps....