main.js: fix regression in _logStack

introduced by commit fa1db361