diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index 5ec0efbd7e62e..29d5e7901aafb 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -30285,7 +30285,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, /*readonly*/ false);
attributesTable = createSymbolTable();
}
- const exprType = getReducedType(checkExpression(attributeDecl.expression));
+ const exprType = getReducedType(checkExpressionCached(attributeDecl.expression, checkMode));
if (isTypeAny(exprType)) {
hasSpreadAnyType = true;
}
diff --git a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.symbols b/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.symbols
deleted file mode 100644
index 9a98bcaf939b1..0000000000000
--- a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.symbols
+++ /dev/null
@@ -1,47 +0,0 @@
-=== tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx ===
-///
-
-// repro #51577
-
-declare function omit(names: readonly K[], obj: T): Omit;
->omit : Symbol(omit, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 0, 0), Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 84))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 22))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 24))
->names : Symbol(names, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 43))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 24))
->obj : Symbol(obj, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 63))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 22))
->Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 22))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 24))
-
-declare function omit(names: readonly K[]): (obj: T) => Omit;
->omit : Symbol(omit, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 0, 0), Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 84))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 22))
->names : Symbol(names, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 40))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 22))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 63))
->obj : Symbol(obj, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 66))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 63))
->Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 63))
->K : Symbol(K, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 5, 22))
-
-declare const otherProps: { bar: string, qwe: boolean }
->otherProps : Symbol(otherProps, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 13))
->bar : Symbol(bar, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 27))
->qwe : Symbol(qwe, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 40))
-
-declare function GenericComponent(props: T): null
->GenericComponent : Symbol(GenericComponent, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 55))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 9, 34))
->props : Symbol(props, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 9, 37))
->T : Symbol(T, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 9, 34))
-
-; // no error
->GenericComponent : Symbol(GenericComponent, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 55))
->omit : Symbol(omit, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 0, 0), Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 4, 84))
->otherProps : Symbol(otherProps, Decl(jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx, 7, 13))
-
-
-
diff --git a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types b/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types
deleted file mode 100644
index 7d6093bcd9efb..0000000000000
--- a/tests/baselines/reference/jsxGenericComponentWithSpreadingResultOfGenericFunction.types
+++ /dev/null
@@ -1,36 +0,0 @@
-=== tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx ===
-///
-
-// repro #51577
-
-declare function omit(names: readonly K[], obj: T): Omit;
->omit : { (names: readonly K[], obj: T): Omit; (names: readonly K[]): (obj: T) => Omit; }
->names : readonly K[]
->obj : T
-
-declare function omit(names: readonly K[]): (obj: T) => Omit;
->omit : { (names: readonly K[], obj: T): Omit; (names: readonly K[]): (obj: T) => Omit; }
->names : readonly K[]
->obj : T
-
-declare const otherProps: { bar: string, qwe: boolean }
->otherProps : { bar: string; qwe: boolean; }
->bar : string
->qwe : boolean
-
-declare function GenericComponent(props: T): null
->GenericComponent : (props: T) => null
->props : T
->null : null
-
-; // no error
-> : JSX.Element
->GenericComponent : (props: T) => null
->omit(['bar'], otherProps) : Omit<{ bar: string; qwe: boolean; }, "bar">
->omit : { (names: readonly K[], obj: T): Omit; (names: readonly K[]): (obj: T) => Omit; }
->['bar'] : "bar"[]
->'bar' : "bar"
->otherProps : { bar: string; qwe: boolean; }
-
-
-
diff --git a/tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx b/tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx
deleted file mode 100644
index abb94add5e62a..0000000000000
--- a/tests/cases/compiler/jsxGenericComponentWithSpreadingResultOfGenericFunction.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-// @strict: true
-// @noEmit: true
-// @jsx: preserve
-
-///
-
-// repro #51577
-
-declare function omit(names: readonly K[], obj: T): Omit;
-declare function omit(names: readonly K[]): (obj: T) => Omit;
-
-declare const otherProps: { bar: string, qwe: boolean }
-
-declare function GenericComponent(props: T): null
-
-; // no error
-
-