App.onStop called twice in simulator

I was seeing mysterious crashes in my code and discovered that the reason is that onStop() is being called twice. The following code...

using Toybox.Application as App;
using Toybox.System as Sys;
using Toybox.WatchUi as Ui;

class TestApp extends App.AppBase
{
function onStart() {
Sys.println("App.onStart");
}

function onStop() {
Sys.println("App.onStop");
}

function getInitialView() {
Sys.println("App.getInitialView");
return [ new TestView(), new TestDelegate() ];
}
}


...produces the following console output...

Connecting...
Connecting to device...
Device Version 0.1.0
Device id 1 name "A garmin device"
Shell Version 0.1.0
App.onStart
App.getInitialView
App.onStop
Complete
App.onStop
Connection Finished


I'm not yet testing on devices. I've since added a null check in my onStop() for robustness, but it should not be necessary.

Travis