Give better errors when incorrect KDMs are used (#1326).