Nodal surfaces of orbitals, in particular of the highest occupied one, play a special role in Kohn-Sham density-functional theory. The exact Kohn-Sham exchange potential, for example, shows a protruding ridge along such nodal surfaces, leading to the counterintuitive feature of a potential that goes to different asymptotic limits in different directions. We show here that nodal surfaces can heavily affect the potential of semilocal densityfunctional approximations. For the functional derivatives of the Armiento-Kümmel (AK13) 2421 (1994)] model potentials, we explicitly demonstrate exponential divergences in the vicinity of nodal surfaces. We further point out that many other semilocal potentials have similar features. Such divergences pose a challenge for the convergence of numerical solutions of the Kohn-Sham equations. We prove that for exchange functionals of the generalized gradient approximation (GGA) form, enforcing correct asymptotic behavior of the potential or energy density necessarily leads to irregular behavior on or near orbital nodal surfaces. We formulate constraints on the GGA exchange enhancement factor for avoiding such divergences.