Make replay restarts work correctly with -g args, and executions that ta...

...ke a long time to hit the start-debugging target.

Resolves #837.  Resolves #844.