Get rid of static and global (!) vars in matrix-data.c.