It doesn't set: it adds (or, more precisely, appends).  See remarks elsewhere for why I think you should get rid of this function entirely and have SetCommand do the whole job.