fix: Preferences: Ensure shadowed preference sets do not result in empty preference sets
https://bugs.activestate.com/show_bug.cgi?id=104645

(integrated from master branch change b3943f2 by Todd Whiteman <toddw@activestate.com>)