Write find_config_macro so it is easier to reason about #3196
Looks like a good way to get into an infinite loop #3196