Fix case where fields is null in global and defined in a builder.

[FIX] issue #536