Errors in the calculations of first‐order and second‐order energy perturbations