We test startingBoundExpr == null again a few lines down. Reorder the code so we only have to test it once and we can put this code in the else clause -- it was initially confusing to me that we were just throwing away this indexExprs -- until I realized that it is essentially a representation of startingBoundExpr which gets re-established as an end condition in the "else" down below.