It seems you can just get rid of `makeTopLevelIndex` and return directly from these error conditions. Then below, you can remove the if-condition around the indexing block. Right now, the return behavior around `err` is funny anyways: you don't build the index if an error occurs in any of these three channels, but you only return the error from this method if it happens in the last of the three channels. Probably not intended?