On the calculation of the bandgap of periodic solids with MGGA functionals using the total energy.