If the user deletes the reflist, data-mw.id will refer to a nonexistent ID in the deleted reflist. This is fine in practice because of selser, but we probably shouldn't be doing this.
I'm not sure if it's ever caused an issue in practice, but it's certainly worrying, since it only works by accident. I imagine this might cause problems if the reflist is deleted and a reference that reuses content from inside the reference is moved in the same edit, but I didn't try very hard to break it at the time. I saw cases where we sent HTML that didn't make any sense and selser magically saved the day, but that's not something I'd like to rely on.