This patch: - Reorders things a bit so that `parent` is always handled before `dependents`. - Uses iterator chaining to avoid some code duplication.
This patch: - Reorders things a bit so that `parent` is always handled before `dependents`. - Uses iterator chaining to avoid some code duplication.