Fixed NPE in DeadCodeEliminationRefactoring

NPE happened with such code:
if (false) { ... }
Infinite loop bug with OpenDJ DatabaseContainer.java.

Added better error message for the infinite loop.
Reproduced the issue with unit tests, but cannot fix it yet.