Optimize relatedItemsIndex and fix nested entity matching in JsonLDLinkCompleterFilter