Merge pull request #4183 from aldelaro5/if-simplification-slowmem Simplify an if condition after PR #4078