Currently CQEngine returns the feature stored in the index. If you then mutate the feature (i.e. setAttribute), it changes the feature in the store, and the indices get out of sync.
Potential solution: use immutable features. Would be nice, if someone tried to mutate one, to have a good error message related to CQEngine.