We study the emergence of discontinuous shear thickening (DST) in cornstarch by combining macroscopic rheometry with local magnetic resonance imaging measurements. We bring evidence that macroscopic DST is observed only when the flow separates into a low-density flowing and a high-density jammed region. In the shear-thickened steady state, the local rheology in the flowing region is not DST but, strikingly, is often shear thinning. Our data thus show that the stress jump measured during DST, in cornstarch, does not capture a secondary, high-viscosity branch of the local steady rheology but results from the existence of a shear jamming limit at volume fractions quite significantly below random close packing.