This is to answer the query from neilb, who found that an attempt to add 1
to the last element of the list {x,y,z,0,0} produced {x,y,z,1,1}, mysteriously.
I tried it with tracing turned On[] and found that the replacement command
is being interpreted as applied to the zeros in the list, because l at
position Length[l] is 0, so 1 is added to all the 0's.