Revert to Philippe's dense_matrix so as to diagnose current problems