This function allows us to keep only the roots, and discard the redundant children after building a 'Forest'.