Ensure a consistent ordering of config keys

Without this patch, config key ordering was not deterministic which
leads to testing failure or potentially useless configuration file
modifications.