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.