Fix issue 4492: base searches don't work.
Copied from the issue:
Fix a bug where an NPE is occurring during ACI processing because the base entry contains a single RDN component which our one-level scope resolution does not handle very well (actually this is understandable - DN.getParent() has surprising behavior for single RDN DNs). This bug can be seen more clearly on trunk builds because the NPE stack trace is non-empty (IIRC there was a bug in older JVM versions where the NPE stack trace could be empty).
Fix a bug where our exception handling code fails when an exception's stack trace is empty (in this case the NPE does not have any stack trace elements).