Remove double if
Merge pull request #5122 from lucasmichot/4.2-remote

[4.2] Remote : remove double if