Remove superflous endifs to if-tests.