I'm confused about something related to the splitting principle. It seems to imply that the Chern classes of any endomorphism bundle are zero, which is not true.
Let $M$ be a manifold of dimension $n$, and $E \to M$ be a smooth complex vector bundle of rank $r$. There exists some space $M'$ and a map $f : M' \to M$ such that $f^*E$ splits as a direct sum of complex line bundles $L_j$, and such that $f^* : H^*(M, \mathbb R) \to H^*(M', \mathbb R)$ is injective.
If $E' = \bigoplus_{j} L_j$, then $\operatorname{End} E'$ is flat: Equip each $L_j$ with some hermitian metric $h_j$, and denote its curvature form by $\omega_j$. The curvature form $\Theta$ of the induced metric on the direct sum is then a diagonal matrix with entries $\omega_j$. But because $\Theta$ is diagonal, it is equal to its transpose, so $$ \Theta_{\operatorname{End} E'} = \operatorname{id}_{(E')^*} \otimes\, \Theta - \Theta^{t} \otimes \operatorname{id}_{E'} = 0. $$
Thus all the Chern roots of $\operatorname{End} f^* E \cong \operatorname{End} E'$ are zero, so all its Chern classes are zero. But as the Chern classes are functorial and $f^*$ injective, all the Chern classes of $\operatorname{End} E$ are then zero as well.
Where have I gone wrong here?