Avoid division by zero during leagcy upgrades.