A widely adopted computational protocol in contemporary materials research is to first relax materials' geometries using semilocal density functional approximations (DFA), and then determining their electronic band structures using the more expensive hybrid functionals. This procedure often works well, as the popular semilocal DFAs, such as the Perdew-Burke-Ernzerhof (PBE) generalized gradient approximation, yield rather good geometries for a wide range of materials. However, here we show that, for some of the lead-free halide double perovskites (HDPs) Cs2BB′X6 (B=Ag+, Na+; B′=In3+, Bi3+; X=Cl−, Br−), the validity of this common practice is questionable. We find that, for these HDPs, the geometrical structures, in particular, the B(B′)−X bond lengths predicted by PBE show large deviations from the experimental values. Additionally, the band gaps of some of these materials (specifically, the In-based HDPs) are sensitive to the B(B′)−X bond lengths. As a consequence, the band gaps obtained using the hybrid functionals (such as the Heyd-Scuseria-Ernzerhof functional) based on the PBE geometries can still be quite off, in particular, for HDPs with B′=In3+. The situation is significantly improved by using hybrid functionals with tuned portion of exact exchange, based on the geometries determined consistently under the same level of theory. The successes and failures of several popular exchange-correlation (XC) functionals are traced back to the so-called delocalization error, and can be quantitatively analyzed and understood via a three-atom linear-chain B−X−B′ molecular model. Finally, our findings provide a practical guide for choosing appropriate XC functionals for describing HDPs and point to a promising path for band structure engineering via doping and alloying. Published by the American Physical Society 2024