Re[2]: 'while' loop on mutable arrays causes stack overflow