Fix up some old code related to IScopeContext for prefs