Fix type-checking of nested config functions