[Bug 24009]: [Shadow] Fix an undefined variable.