Would be nice to have a docstring to explain what this does, even if it's internal.