Repository: aws-cloudformation/cfn-lint

Issue:
`!FindInMap` issues while in `Fn::ForEach`, cannot find resource or parameter 
### CloudFormation Lint Version

cfn-lint 0.87.0

### What operating system are you using?

Ubuntu

### Describe the bug

I am now getting:
> E1012 Ref AccountId not found as a resource or parameter

When using `!FindInMap` in a `Fn::ForEach`

### Expected behavior

I expected this to pass as this deploys fine.

### Reproduction template

```yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::LanguageExtensions'

Description: Configures IAM Identity Center. IAM Identity Center must be enabled before you create this stack.

Parameters:

  IamIdentityCenterInstanceArn:
    Type: String
    Description: 'The ARN for the IAM Identity Center Instance. Found in the settings of IAM Identity Center.'

  IdentityStoreId:
    Type: String
    Description: 'The id for the identity store. Found in the settings of IAM Identity Center.'


Mappings:

  AccountIdsMap:
    # GovCloud
    "101010101010":
      DevSandAccount: "1111111111111"
      ProjectADevAccount: "22222222222222"
      ProejctADemoAccount: "333333333333333"
    # Commercial
    "101010101011":
      DevSandAccount: "1111111111112"
      ProjectADevAccount: "22222222222223"
      ProejctADemoAccount: "333333333333334"


Resources:

  SystemAdminPermissionSet:
    Type: AWS::SSO::PermissionSet
    Properties:
      InstanceArn: !Ref IamIdentityCenterInstanceArn
      Name: 'SystemAdmin'
      Description: 'System Admin Permissions'
      SessionDuration: 'PT8H'
      InlinePolicy:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action: '*'
            Resource: '*'

  SystemAdminGroup:
    Type: AWS::IdentityStore::Group
    Properties:
      DisplayName: SystemAdmin
      Description: 'System Admin Group'
      IdentityStoreId: !Ref IdentityStoreId

          
  # Testing Account Assignments
  'Fn::ForEach::SystemAdminAssignments':
    - AccountId
    - - DevSandAccount
      - ProjectADevAccount
      - ProejctADemoAccount
    - 'SystemAdminAssignment${AccountId}':
        Type: 'AWS::SSO::Assignment'
        Properties:
          InstanceArn: !Ref IamIdentityCenterInstanceArn
          PermissionSetArn: !GetAtt SystemAdminPermissionSet.PermissionSetArn
          TargetId: !FindInMap
            - AccountIdsMap
            - !Ref AWS::AccountId
            - !Ref AccountId
          TargetType: AWS_ACCOUNT
          PrincipalId: !GetAtt SystemAdminGroup.GroupId
          PrincipalType: GROUP
```


Discussion:

Resolving patch:
diff --git a/src/cfnlint/template/transforms/_language_extensions.py b/src/cfnlint/template/transforms/_language_extensions.py
--- a/src/cfnlint/template/transforms/_language_extensions.py
+++ b/src/cfnlint/template/transforms/_language_extensions.py
@@ -169,6 +169,9 @@ def _walk(self, item: Any, params: MutableMapping[str, Any], cfn: Any):
                     except Exception as e:  # pylint: disable=broad-exception-caught
                         # We couldn't resolve the FindInMap so we are going to leave it as it is
                         LOGGER.debug("Transform and Fn::FindInMap error: %s", {str(e)})
+                        for i, el in enumerate(v):
+                            v[i] = self._walk(el, params, cfn)
+                        obj[k] = v
                 elif k == "Ref":
                     if isinstance(v, str):
                         if v in params:


Test patch: