Handle empty arrays in the subscript operator
Use newConcurrentHashSet and newIdentityHashSet