Remove pointless calc in genmat.