If I would do the code review, I would come to the exact same conclusion as the analyzer tool without knowing any context of what
normalize()
or
rotate()
do and whether they have side effects. I would prefer the second variant that you presented as workaround together with proper documentation. Coding is not only about legality, but also about readability and maintainability. —
André 51 secs ago