shell: Guard against accessing Settings prematurely.

Fixes #1237.