We report a measurement of the mass of the top quark in lepton+jets final states of pp →tt data corresponding to 2.6 fb −1 of integrated luminosity collected by the D0 experiment at the Fermilab Tevatron Collider. A matrix-element method is developed that combines an in situ jet energy calibration with our standard jet energy scale derived from studies of γ+jet and dijet events. We then implement a flavor-dependent jet response correction through a novel approach. This method is used to measure a top-quark mass of mt = 176.01 ± 1.64 GeV. Combining this result with our previous result obtained on an independent data set, we measure a top-quark mass of mt = 174.94 ± 1.49 GeV for a total integrated luminosity of 3.6 fb −1 .