You combine task rollups and dependancies in your example. Dependancy cannot be set between rollup tasks.
See the help:
Task Management rules Roll-up rules
Calculations include only days marked as workdays (and not holidays) on the Calendar.
The original Start and Due dates for parent topics along a rollup branch are lost when their Task Info is calculated.
Progress is only calculated from sub-tasks that have progress assigned. Sub-tasks without Progress values are ignored during the calculation.
Roll-up is not supported for callout topics.
Dependencies can only be created between topics in roll-up branches. Relationships that include a topic that is not in a roll-up branch are treated as normal relationships, and do not influence the task info calculation.
You can edit the Task Info for the dependent (second) task in a dependency, but you will not be allowed to choose dates that do not abide by the dependency.
When the Task Info for a topic is read-only (grayed) the task may only be the determining (independent) task in a dependency:
Tasks that are in roll-up branches, and whose Task Info is calculated
Tasks linked to SharePoint tasks
Read-only tasks linked to Outlook tasks
Dependencies are not allowed that cause circular dependencies. A circular dependency exists when one topic influences the Start or Due date of the other topic in the dependency.
A dependency will be deleted when it violates the rules for allowed dependencies.
The rolled up main topics at the top of each branch are in effect summaries of the total duration and level of completion for that branch and as such are not part of the task path.