Fix handling of pref defaults (#3747, #3588)