APF-1454: Dynamically determine current branch.