Don't access current_frame f_locals
Don't access current_frame f_locals

This should fix #13020

Though it's a suttle enough bug that tests needs to be written.
And we can't rely on doctests as they are not ran.

ipython/ipython,ipython/ipython