Ok, here I go:

Before:

if `inner` was run _once_ (no recursion), either `undefined` or an array of markers would be returned.
if `inner` was run more than once (recursion), it would always return an array. If one of the subsequent calls of `inner` returned `undefined`, `undefined` would be concatenated to the last call's array of markers. Which means that when the recursion finishes, the array of markers might contain `undefined` instead of a marker sometimes.

Now:

`inner` _always_ returns an array, either empty or an array of markers. (When fixing the bug I didn't think about that `undefined` could be returned instead of an array before.)
if `inner` is run more than once (recursion), subsequent calls of `inner` cannot return `undefined`. Instead the return an empty array. That empty array would be concatenated to the last call's array of markers, which is a no-op. Which means that when the recursion finishes, the array of markers never contains `undefined` instead of a marker.

So, now that an array always is returned, should I remove those question marks from the `markers?.length` checks?