Index: /tags/ipp-pv3-20140717/Ohana/src/addstar/src/FilterStars.c
===================================================================
--- /tags/ipp-pv3-20140717/Ohana/src/addstar/src/FilterStars.c	(revision 37329)
+++ /tags/ipp-pv3-20140717/Ohana/src/addstar/src/FilterStars.c	(revision 37330)
@@ -9,5 +9,5 @@
 
 // the imageID supplied here is the sequence **within this set**
-// this value is updated based on the image table later
+// this value is updated based on the image table later (in UpdateImageIDs)
 Stars *FilterStars (Stars *instars, Image *image, unsigned int imageID, const AddstarClientOptions *options) {
 
@@ -127,4 +127,9 @@
     stars[N].measure.imageID = imageID; // this value is updated in UpdateImageIDs
 
+    // add imageID to lensing entry, if it exists
+    if (stars[N].lensing) {
+      stars[N].lensing->imageID = imageID;
+    }
+
     N ++;
   }
Index: /tags/ipp-pv3-20140717/Ohana/src/addstar/src/UpdateImageIDs.c
===================================================================
--- /tags/ipp-pv3-20140717/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 37329)
+++ /tags/ipp-pv3-20140717/Ohana/src/addstar/src/UpdateImageIDs.c	(revision 37330)
@@ -55,4 +55,7 @@
   for (i = 0; i < Nstars; i++) {
     stars[i].measure.imageID += imageID;
+    if (stars[i].lensing) {
+      stars[i].lensing->imageID += imageID;
+    }
   }
 
