main.js: fix regression in _logTrace
Merge pull request #2049 from autarkper/logstack-regression-fix

main.js: fix regression in _logTrace