fix addcyclic so it can handle masked arrays
Authored by: jswhit 2007-09-25
Parent: [r3886]
Child: [r3888]