I had the same problem. I'm using a script to keep track of my group's current leader and send a new leader to all behavior trees in the group via a SharedGameObject when the old leader dies or is destroyed, and I would get the same null reference error if a Tactical task was running when the leader changed. Interestingly, the Formations tasks didn't have this problem at all and switched leaders smoothly, while the Tactical tasks would spam the null reference.
What fixed it for me was going into the OnUpdate() method in TacticalGroup.cs and changing both instances of "return TaskStatus.Running" to "return runStatus". This way the task fails correctly when EndFormation() is called. It's coded like this in FormationGroup.cs already.