When every finitely generated flat module is projective