I don't generally use metadata but seeing mention of DownloadManager reminded me of the old 'feature' where downloading a theme often fails the first time but succeeds the second. Maybe this is the same issue - a race condition within DownloadManager (that won't occur when logging/debugging)