@yehuda:
I'm assuming you disagree with what I wrote, since you mention Context. I think you misunderstood.
Copying the
code works fine, as I said; there I think we agree. However, copying the
cell (by selecting the cell bracket) does not. The behavior when the whole cell is copied is obvious. This shot was taken while it's running. Note that i has not been updated and the contexts are different. (The whole point of adding the use of Context was to show this difference.)
FWIW, here is full expression of the cell I think the OP copied (obtained from the menu command Cell > Show Expression):
Cell[BoxData[
RowBox[{"Monitor", "[",
RowBox[{
RowBox[{
RowBox[{"i", "=", "0"}], ";",
RowBox[{"While", "[",
RowBox[{
RowBox[{"i", "<", "100"}], ",",
RowBox[{
RowBox[{"Pause", "[", "0.1", "]"}], ";",
RowBox[{"i", "++"}]}]}], "]"}], ";", "i"}], ",", "i"}], "]"}]], "Input",
GeneratedCellStyles->{"PrintTemporary"->{"PrintTemporary", CellContext -> CellGroup}},
CellLabel->"In[1]:=",
CellID->90012738]
Copying this cell copies the option setting for
CellContext that causes the i being monitored to be different than the i in the While loop.