Therefore, I would suggest saving the initial page pks in a separate list and probably also add assertions like
```assert set(page_with_children.keys()) == set(initial_pks)``` just to make sure that developers don't accidentally add stuff to pages_with_children