Creating waves in a loop

Trivial problem:
why does:

wave w = $(baseName + num2istr(index))
successfully retrieve a wave into w but the inverse:
Duplicate/O $(baseName + num2istr(index)), test

returns the error "expected wave name" when these lines are in the same loop?

I am trying to do the most trivial thing: Duplicate a series of waves retrieved in a loop so that I can do manipulations on them without changing the original waves. How can one do this without typing RecordA0, RecordA1, etc. in?
Thanks!

(Igor 5.04B)
ap
Must be more to the story. The following works fine (Igor 6.12 but should be the same in 5.)
Function test()
    Make/O $"jack0"
   
    String baseName="jack"
    Variable index=0
   
    Duplicate/O $(baseName+num2istr(index)), junk
end



Try setting a breakpoint and verify the baseName and index values are really the same in both cases.