I made a change so that I removed the part where indexes should be shifted after deleting image log entry. It would be better to keep the index "empty" so that if that entry is queries it would return DENIED or  CAMERA_IMAGE_CAPTURED with empty file_url.