3.x Fix for config loader in FormHelper And WidgetRegistry

Related to #5163
@dereuromark Take a look here #4580 and here #4587.