Why erase and then re-add?

I couldn't reproduce this bug (thanks so much for this!), but I imagine we don't need to reorder the functions path?