Tweek layout of flatten_dict function.