Fix remapping visible indices on compress matrix.