Generalize the type of `lookup` and `subconfig`