Fixed branch occurrence validation