This function is only called in two places: the deprecated "remove" method and
in the new set_untracked method.
So we simply inline the appropriate content in set_untraked, paving the way
to dropping the deprecated code and its associated function.