some atomicity to theme reuploading (bug 876819)