IsDetachedHead(branch) can be static