Merge "Normalize semaphore branch handling"