Fix deadlock when extracting 0 sized files from remote repositories