The code-removal patches work because the test case is flaky. Indeed, there are code-removal patches (e.g., Patch 8 and Patch 9) that change the program in a opposite way.
When such a situation occurs, this could be seen by the developer as a sign that the result of a test case is independent of the change applied to the if condition.