An update to this possible bug, not exactly the same case but I think it is relevant.
In a pine mire, I was building a shelter and I told my companion to build a fire at the mean time.
After the fire was build, my companion walk straight to SW, zero intention to return to me.
When I realized he's going into the darkness without reason, he's already gone too far for me to command him to return.
And my character is too slow to chase him, in desperate I tried to zoom-out and it worked.
My companion is just a tile away from me after zoom-in, but he still wanted to walk away.
Again, I have to [!]Command him and told him to stop task, then he finally willing to stay near me.