[runtime] Don't perform double accounting of offset for named memory segments. Fixes #20591