Implement lattice-spacegroup compatibility checking.