I have a widget that adds a layer from the result of a gpservice. Users can re-run the gp tool for different dates. In doing so the layer is removed and then re-added (with same id) when the new gpresult is returned. The pop ups are acting strange when i do this. As you can see I have these "ghost" features that show the pop up for outlined in blue. The yellow feature in the middle is from the newest gpresult. I can't figure out why it is still requesting the pop up info from the first gpresult.
<SPAN class="keyword token">function</SPAN> <SPAN class="token function">gpJobComplete</SPAN><SPAN class="punctuation token">(</SPAN>jobinfo<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
gp<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getResultImageLayer</SPAN><SPAN class="punctuation token">(</SPAN>jobinfo<SPAN class="punctuation token">.</SPAN>jobId<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>layer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
layer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setOpacity</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">0.7</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
layer<SPAN class="punctuation token">.</SPAN>title <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Hail History Swath"</SPAN><SPAN class="punctuation token">;</SPAN>
layer<SPAN class="punctuation token">.</SPAN>id <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Hail_History_Swath"</SPAN>
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>layer<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN