This patch really does not make situation worse - it just follows the logic which was used before, just calculates the numbers when they are not present. Checking whether they are valid would be indeed useful, but this can be done separately...