Bug 9811: FIX branches loop was not correctly set