Fix Sonar major violation: Collapsible If Statements
Merge branch 'master' into 5.6.0