Yes, i know this is because recursion, but there may be another solution like `renderHeaders($items, $options = array(), $index)`. But not sure about this.