### Self-service - [X] I'd be willing to implement a fix ### Describe the bug See title and the reproduction below. Originally reported by @vefydwy in #3278. ### To reproduce ```js repro await packageJsonAndInstall({ version: `0.0.0`, }); await expect(yarn(`version`, `2.0.0`)) .resolves.toBeTruthy(); ``` ### Environment ``` System: OS: Linux 5.13 Arch Linux CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor Binaries: Node: 16.0.0 - /tmp/xfs-049440fa/node Yarn: 3.0.1.dev - /tmp/xfs-049440fa/yarn npm: 7.10.0 - ~/.nvm/versions/node/v16.0.0/bin/npm ``` ### Additional context Broken by https://github.com/yarnpkg/berry/pull/3158.