You were right: once $level = -1, `!empty($status[$level]['del'])` is false and so is `isset($status[$level]['flags'])`
then the loop stops.