Comment made by: alexmiller
I believe what's happening here is that in the first case, it gets typed as a PersistentVector (concrete data structure read by the reader). PV implements Collection and so requires no reflection.
In the second case, the vector requires evaluation and its type is IPersistentVector (the interface). IPV does not extend Collection (its independent of that interface) and so it can't find the indexOf method.
Stepping back from both, we're doing Java interop on an object that we are expecting to be a Collection. I'm somewhat on the fence about whether we should expect ids to carry this info when performing interop on it here. Depends how much you think that the abstract Clojure vector collection is a Java collection (vs the implementation of one).
Doesn't seem easily "fixable" to me in ways that are clean.