fixed lost reference to names[i] in 'possible to control...' test loop with a immediately-invoked function expression