config: correctly handle elements type.

Previously an element of type 'object' would be rendered on a different
level and also without the correct value.