gui.Object.toArray always returns an array.
Account for gui.MODE_MANAGED.
Merge pull request #19 from wiredearp/master

gui.MODE_MANAGED...