Smashed this bug myself - this might be a forgotten piece of code since it wasn't expected to affect anything...

There are two calls to show_replies() in showthreaded.php

One call has this guard:
if (isset($tree[$PNumber]['children'])) {

The other has no guard, so I added the following:
if (isset($tree[$current]['children'])) {

and it seems to be working correctly so far.