As an optimization we maintain an index of the confirmed branch and the next strongest branch, as more than one competitive candidate is extremely unlikely. A 51% attack is two competing chains. Furthermore, maintaining weak branches incurs almost no storage cost, so a decision to preclude weak branches below some arbitrary depth becomes important, though arbitrary.