Delete ME after writing

@Dr15Jones 
this should address the comment you made to #5650

comments are welcome.. :)

ciao,
F.
The call to ```erase``` invalidated i_lumi so you can't advance it. I think what you need to do is
 ```
auto temp = i_lumi++;
if( temp->getFullname() ... ) {
   data_.erase(temp);
}
```