Separate out flatMapValues to flatten, add extension method