add temporary branchID in SmartRef
add SetBranchID for SmartRef