Remove unnecessary references to stackframe.