Fix ObjectWalk corruption when skipping over empty trees
The supplied test case comes out of the example tree identified by
Robert de Wilde and Ilari on #git:
$ git ls-tree -rt
a54f1a85ebf6a7f53aa60a45a1be33f8b078fb7e
040000 tree
bfe058ad536cdb12e127cde63b01472c960ea105 A
040000 tree
4b825dc642cb6eb9a060e54bf8d69288fbee4904 A/A
040000 tree
4b825dc642cb6eb9a060e54bf8d69288fbee4904 A/B
100644 blob
abbbfafe3129f85747aba7bfac992af77134c607 B
In this tree, "B" was being skipped because "A/A" as an empty tree
was immediately followed by "A/B", also an empty tree, but the
ObjectWalk broke out too early and never visited "B".
Bug: 286653
Change-Id: I25bcb0bc99d0cbbbdd9c2bd625ad6a691a6d0335
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>