Replacing depth counter with branchNum counter.
Fixes all-bracket access, breaks others.