Consider bootstrap reason on startup (fixes #881)

My fix for #881 . Have I missed any eventualities?