There's no reason to call flatten(), you can call get() on the config instance itself.