Question: Assigning variables inside procedure, set exclusion doesn't work outside procedure

Ok, so here's my first question on Mapleprimes.  

I have the following procedure:

BlocksLSymm:=proc(stringLength) 
local i, j, V;
global vars_set;
V:=Vector(2^(stringLength)+1,symbol=x):
# Create List
vars_set:={};
x[1]:=x[2];
for i from 0 to stringLength do 
 for j from 0 to i do
  vars_set:={op(vars_set), x[2^i-2^j+1]};
 end do; 
end do;
end proc: 

BlocksLSymm(5);

vars_set; 
                     {x[2], x[3], x[4], x[5], x[7], x[8], x[9], x[13], x[15], x[16]}
vars_set minus {x[1],x[2]};
         
                     {x[2], x[3], x[4], x[5], x[7], x[8], x[9], x[13], x[15], x[16]}

So the set minus operation doesn't work in this situation, and I can't understand why.  It works properly when I take the code out of the procedure and run it.  In a simplified version,

W:=Vector(3, symbol=w); B:={w[2],w[1],w[3]}; w[1]:=w[2]; B; B minus {w[2]};
 returns {w[3]} , as expected.

and the minus operation works when I exclude the line 
x[1]:=x[2];
from the procedure.   

Please Wait...