Fix bug with recent-branches sometimes returning nil