Fix for config loader in FormHelper And WidgetRegistry

Related to #5163
We don't use inline if clauses.