Description
Begin is not adding context, and End might not be removing variables added.
How to Reproduce and Output Given
In[1]:= ??f
Out[1]= Global`f
In[2]:= Begin["MyContext`"]
Out[2]= "MyContext`"
In[3]:= f[x_] := x^2
In[4]:= ??f
Out[4]= Global`f (* Wrong. Should be MyContext` *)
f[x_] = x^2
In[5]:= End[]
Out[5]= "MyContext`"
In[6]:= ??f
Out[6]= Global`f (* Wrong. Should have been removed *)
f[MyContext`x_] = MyContext`x^2
Additional context
Noticed while trying to understand why certain Mathematica packages are failing.