You should not write broken/buggy code just to satisfy code analysis.

In this case, we should ignore the warning; this method is legitimately complicated.