revert to previous flattenFieldToMatch logic with nil checks
revert to previous flattenFieldToMatch logic with nil checks

terraform-providers/terraform-provider-aws,terraform-providers/terraform-provider-aws,terraform-providers/terraform-provider-aws,terraform-providers/terraform-provider-aws