[12793] Fix static analysis repeated expression performance warning (1)
[12794] Fix a few more static code analysis warnings