  The IceCube neutrino observatory measures the diffuse flux of high-energy
astrophysical neutrinos by means of various techniques, and there exists a mild
tension between spectra obtained in different analyses. The spectrum derived
from reconstruction of muon tracks is harder than that from cascades, dominated
by electron and tau neutrinos. If confirmed, this tension may provide a clue to
the origin of these neutrinos, which remains uncertain. Here we investigate the
possibility that this tension may be caused by the change of the flavor content
of astrophysical neutrinos with energy. We assume that at higher energies, the
flux contains more muon neutrinos than expected in the usually assumed flavor
equipartition. This may happen if the neutrinos are produced in regions of the
magnetic field so strong that muons, born in pi-meson decays, cool by
synchrotron radiation faster than decay. The magnetic field of $\sim 10^4 G$ is
required for this mechanism to be relevant for the IceCube results. We note
that these field values are reachable in the immediate vicinity of supermassive
black holes in active galactic nuclei and present a working toy model of the
population of these potential neutrino sources. While this model predicts the
required flavor ratios and describes the high-energy spectrum, it needs an
additional component to explain the observed neutrino flux at lower energies.
