We discuss the adiabatic self-trapping of small polarons within the density-functional theory. In particular, we carried out plane-wave pseudopotential calculations of the triplet exciton in NaCl and found no energy minimum corresponding to the self-trapped exciton contrary to the experimental evidence and previous calculations. To explore the origin of this problem we modeled the self-trapped hole in NaCl using hybrid density functionals and an embedded-cluster method. Calculations show that the stability of the self-trapped state of the hole drastically depends on the amount of the exact exchange in the density functional: at less than 30% of the Hartree-Fock exchange, only delocalized hole is stable, at 50%-both delocalized and self-trapped states are stable, while further increase of exact exchange results in only the self-trapped state being stable. We argue that the main contributions to the self-trapping energy such as the kinetic energy of the localizing charge, the chemical bond formation of the dihalogen quasimolecule, and the lattice polarization, are represented incorrectly within the Kohn-Sham based approaches.