Spatially-protected topology and group cohomology in band insulators