In versions prior to 4.6.2 it is not possible to use arbitrary variable names with array indexes (see https://issues.couchbase.com/browse/MB-22646).
As I'm using 4.5.1 CE I did use the exact same variable name as in the index definition. As I had to 2 where clauses using the same index, I've used the same variable name twice (even though in different parenthesis).
when doing the results are random and different every time I do execute this query (sometimes all results are returned, sometimes just a few and in most cases none) which made me think it might be a concurrency issue.
When using different variable names in the two collection operators everything is working as expected:
In versions prior to 4.6.2 this obviously results in the index not being used for the second collection operator, but at least there is a workaround, so it's not super urgent. But it's something which can easily happen and cause unexpected results.