Nope, this change was added to the PR so it doesn't actually fit the explanation of the PR, which is probably what is confusing.

This is saying that if we get a temp of duration 0, then it means that there were events stacked up and we need to ignore the current event for the purposes of generating a temp basal.  What actually happens in this case is one of two things: 

1. We have a scheduled basal that ends up generating a scheduled event.  In which case the temp is actually computed off of the next event, which is correct.
2. We have a temp basal which ends up clobbering this event.  In which case, we can't really know which is correct and so we just assume the "later" one is better. 

That said, when I went to explain this, I realized how confusing it is and it's not actually covered in the unit tests.  So, let me go back and add a case to the unit tests.  Fwiw, this does fix a problem that I found with legit data, so it's needed.  Just needs the logic to be more intelligible.