Andrus, I assigned CAY-503 even though I'm still trying to track down the problem myself. If you see that I've reached a point where the answer is obvious, please let me know :) Or if I'm heading down the wrong path.
It looks like to me that the problem is that ObjectId equals() or hashCode() is broken.
