The function would return two very different layouts in different code paths, making it not clear to the caller what to expect. For one code path the return value was rather useless, and in fact unused, so I was able to just remove this. Also clarified behavior and return values in the function API comment.