Resource: push conditional down into #verify_download_integrity
Resource: extract unpacking from #stage

Closes #23768.