[runtime] Fix an SRE assert. Fixes #19039.