Fix treatment of elements in addAnnotationsToData()

It should skip annotating elements, but doesn't.

Change-Id: I28fa83832748eb76fa9238e52074bb785ab1cf49