Wow, this code really surprised me. I guess I missed commit 2e1b6ac8453cd1579908f8712ca9a0069787b82f for years ago...

That loop should obviously be removed and replaced with a connection to mTarget.removed signal, since it is rather bad for performance. Also, the patch destroyed another performance optimization by replacing `*i = *(i_end - 1); mContent->things.pop_back(); ` with `mContent->things.erase(i);`. The former copied one entity while the latter copies all entities that come after it. Anyway, something for another patch.