I think it's faster to check: old_instance.image_id == filer_img.image_id