core/lib/settings: Fixed an error in preprocessing logic