1-Wire, DS18B20... How do I search the bus?

I have experienced the same problem with search not terminating when there are more than four devices on the wire. Last night I put together a test system, demonstrated it has the same problem, studied the signaling with a scope, and tracked the problem to what appears to be a misplaced statement, line 268.

The logic is complex enough that I want to go through it again with a clear head. I would like to know more about Waffle's simulation. What search tree configurations did you simulate? I ask because I suspect some missing flag initialization which removing line 268 does not address.

Kudos to Waffle, and to my friend Wayne, for their assistance tracking down this problem.