OAK-4805: Misconfigured lucene index definition can render the whole system unusable (backport r1761762 from trunk)