Index defects in the theory of spectral boundary value problems