Fix handling of traces with no entries

Test: npm run build:unit && npm run test:unit
Change-Id: Ic715711c0f9971b8b6d5dfc7219e6c459e1a421e
8 files changed