Stability of closed gaps for the alternating Kronig-Penney Hamiltonian