Fix undefined index error with empty arrays in YAML.