retry on duplicate exceptions when saving gallery images
Merge pull request #785 from code-dot-org/fix-duplicate-gallery-exception

retry on duplicate exceptions when saving gallery images