Prevent empty jndi segments.