Not every flour-for-flour exchange is the same as forbidden wheat-for-wheat-flour barter. Where both sides are properly identified flour of the same kind, the classical volumetric equality inquiry is different because both sides share a similar processed state.
But one bag of plain flour and another containing additional ingredients may involve a different analysis. Their actual contents and the governing measure must be established rather than assuming that equal prices resolve the matter.