Tested and fixed dedupe for existing images.