Use environment for archive.extracted. Fixes #10324.