refactored DefaultsManager#merge_with_defaults