Fix TriggerRuleDep when the mapped tasks count is 0
#30084
Merged
TriggerRuleDep when the mapped tasks count is 0
#30084