On the flat dimension of certain modules of generalized fractions