Small optimization possibility reported by Coverity
Merge branch 'bugfix/CID-1241967'